I have a sample code:
$content = "";
$wysiwyg = JFactory::getEditor();
$html = $wysiwyg->display('html', $content, '100%', '400px', '', '', array(''));
And Jquery
Joomla.submitbutton = function(pressbutton) {
if(pressbutton == 'save') {
jQuery.ajax({
success: function(data) {
jQuery('#html').html('test test test');
}
});
} else {
submitform(pressbutton);
}
}
When I click submit save, text editor can't insert test test test
, How to fix it ?