selection

public selection : tinymce.dom.Selection
Selection instance for the editor.

Examples

// Sets some contents to the current selection in the editor
tinyMCE.activeEditor.selection.setContent('Some contents');

// Gets the current selection
alert(tinyMCE.activeEditor.selection.getContent());

// Selects the first paragraph found
tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]);