Skip to content
Troex Nevelin edited this page Jul 28, 2013 · 3 revisions

Get editor content

var content = $('selector').elrte('val');

Set content

var html_code = '<p>This is example <strong>HTML</strong> code.</p>';
$('selector').elrte('val', html_code);

Update textarea value

When you submit from with own JS function and want to force editor to put current contents to the hidden textarea:

$('selector').elrte('updateSource');

Remove/destroy editor

Will completely remove editor from document and return it to previous state with updated content

$('selector').elrte('destroy');
Clone this wiki locally