createHTML

public function createHTML(n:String, a:Object, h:String):String
Create HTML string for element. The element will be closed unless an empty inner HTML string is passed.

Examples

// Creates a html chunk and inserts it at the current selection/caret location
tinyMCE.activeEditor.selection.setContent(tinyMCE.activeEditor.dom.createHTML('a', {href : 'test.html'}, 'some line'));

Params

Name Type Description
n String Name of new element.
a Object Optional object name/value collection with element attributes.
h String Optional HTML string to set as inner HTML of the element.

Returns

String String with new HTML element like for example: <a href="#">test</a>.