TinyMCE:API/tinymce.dom.DOMUtils/remove
From Moxiecode Documentation Wiki
Contents |
[edit]
Method: remove
[edit]
Summary
Removes/deletes the specified element(s) from the DOM.
[edit]
Syntax
<Element/Array> remove(<String/Element/Array> n, <bool> k)
[edit]
Parameters
- n
- ID of element or DOM element object or array containing multiple elements/ids.
- k
- Optional state to keep children or not. If set to true all children will be placed at the location of the removed element.
[edit]
Returns
HTML DOM element that got removed or array of elements depending on input.
[edit]
Examples
// Removes all paragraphs in the active editor
tinyMCE.activeEditor.dom.remove(tinyMCE.activeEditor.dom.select('p'));
// Removes a element by id in the document
tinyMCE.DOM.remove('mydiv');
