TinyMCE:API/tinymce.dom.DOMUtils/setOuterHTML
From Moxiecode Documentation Wiki
Contents |
[edit]
Method: setOuterHTML
[edit]
Summary
Sets the specified outer HTML on a element or elements.
[edit]
Syntax
<void> setOuterHTML(<Element/String/Array> e, <Object> h, <Document> d)
[edit]
Parameters
- e
- DOM element, element id string or array of elements/ids to set outer HTML on.
- h
- HTML code to set as outer value for the element.
- d
- Optional document scope to use in this process defaults to the document of the DOM class.
[edit]
Examples
// Sets the outer HTML of all paragraphs in the active editor
tinyMCE.activeEditor.dom.setOuterHTML(tinyMCE.activeEditor.dom.select('p'), '<div>some html</div>');
// Sets the outer HTML of a element by id in the document
tinyMCE.DOM.setOuterHTML('mydiv', '<div>some html</div>');
