TinyMCE:API/tinymce.dom.DOMUtils/setOuterHTML

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: setOuterHTML

Summary

Sets the specified outer HTML on a element or elements.

Syntax

<void> setOuterHTML(<Element/String/Array> e, <Object> h, <Document> d)

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.

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>');
Personal tools