# inputEx - TinyMCEField Usage

## Important Notice :

TinyMCE is not included in the inputEx distribution !
Download it on http://tinymce.moxiecode.com/ (tested with version 3.3.7) and install it in lib/tiny_mce

## Basic TinyMCEField creation

Use the following code to create a basic inputEx TinyMCEField.

new inputEx.TinyMCEField({parentEl: 'container1', name: 'rteField', value: String.fromCharCode(60)+"b"+String.fromCharCode(62)+"I'm"+String.fromCharCode(60)+"/b"+String.fromCharCode(62)+" the default value. I've been set through the value option."});

## TinyMCEField setValue/getValue

Test for setValue/getValue using the TinyMCEField.

var div = YAHOO.util.Dom.get('container2'); var htmlField = new inputEx.TinyMCEField({parentEl: div, name: 'test2'}); var button1 = inputEx.cn('button', null, null, "SetValue"); div.appendChild(button1); YAHOO.util.Event.addListener(button1, "click" ,function() { htmlField.setValue('TinyMCEField can contain HTML !'); }); var button2 = inputEx.cn('button', null, null, "GetValue"); div.appendChild(button2); YAHOO.util.Event.addListener(button2, "click" ,function() { alert(htmlField.getValue()); });

## Using the SimpleEditor

Use the following code to create a SimpleEditor widget

var field3 = new inputEx.TinyMCEField({parentEl: 'container3', name: 'rteField3'}); field3.setValue("Value set just after init...");