remove

public function remove(node:String/Element/Array, keep_children:Boolean):Element/Array
Removes/deletes the specified element(s) from the DOM.

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

Params

Name Type Description
node String/Element/Array ID of element or DOM element object or array containing multiple elements/ids.
keep_children Boolean Optional state to keep children or not. If set to true all children will be placed at the location of the removed element.

Returns

Element/Array HTML DOM element that got removed or array of elements depending on input.
User Image
  • 2011-04-06 22:25:30

Gavin.Douglas

I think DOM should be uncapitalized to 'dom' here:

// Removes a element by id in the document
tinyMCE.dom.remove('mydiv');

:)