TinyMCE:API/tinymce.Editor/getContent

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: getContent

Summary

Gets the content from the editor instance, this will cleanup the content before it gets returned using the different cleanup rules options.

Syntax

<String> getContent(<Object> o)

Parameters

o
Optional content object, this gets passed around through the whole get process.

Returns

Cleaned content string, normally HTML contents.

Examples

// Get the HTML contents of the currently active editor
console.debug(tinyMCE.activeEditor.getContent());

// Get the raw contents of the currently active editor
tinyMCE.activeEditor.getContent({format : 'raw'});

// Get content of a specific editor:
tinyMCE.get('content id').getContent()
Personal tools