TinyMCE:API/tinymce.dom.Selection/getContent
From Moxiecode Documentation Wiki
Contents |
[edit]
Method: getContent
[edit]
Summary
Returns the selected contents using the DOM serializer passed in to this class.
[edit]
Syntax
<String> getContent(<Object> s)
[edit]
Parameters
- s
- Optional settings class with for example output format text or html.
[edit]
Returns
Selected contents in for example HTML format.
[edit]
Examples
// Alerts the currently selected contents
alert(tinyMCE.activeEditor.selection.getContent());
// Alerts the currently selected contents as plain text
alert(tinyMCE.activeEditor.selection.getContent({format : 'text'}));
