setContent

public function setContent(content:String, args:Object):String
Sets the specified content to the editor instance, this will cleanup the content before it gets set using the different cleanup rules options.

Examples

// Sets the HTML contents of the activeEditor editor
tinyMCE.activeEditor.setContent('<span>some</span> html');

// Sets the raw contents of the activeEditor editor
tinyMCE.activeEditor.setContent('<span>some</span> html', {format : 'raw'});

// Sets the content of a specific editor (my_editor in this example)
tinyMCE.get('my_editor').setContent(data);

// Sets the bbcode contents of the activeEditor editor if the bbcode plugin was added
tinyMCE.activeEditor.setContent('[b]some[/b] html', {format : 'bbcode'});

Params

Name Type Description
content String Content to set to editor, normally HTML contents but can be other formats as well.
args Object Optional content object, this gets passed around through the whole set process.

Returns

String HTML string that got set into the editor.