TinyMCE:API/tinymce.dom.Selection/setContent
From Moxiecode Documentation Wiki
Contents |
[edit]
Method: setContent
[edit]
Summary
Replaces the current selection with the specified content. If there is no selection the content will be inserted at the caret position.
[edit]
Syntax
<void> setContent(<String> h, <Object> s)
[edit]
Parameters
- h
- HTML content to set; could also be other formats depending on settings.
- s
- Optional settings object with for example data format.
[edit]
Examples
// Inserts some HTML contents at the current selection
tinyMCE.activeEditor.selection.setContent('<strong>Some contents</strong>');
