Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goodwill/81625 to your computer and use it in GitHub Desktop.
Save goodwill/81625 to your computer and use it in GitHub Desktop.
beforeSubmit: function(data, target, options)
{
if ($('#use_rtf_editor').attr('checked'))
{
var editor_id=$("textarea[name='page_section[text]']",target).attr('id');
var editor=tinyMCE.getInstanceById(editor_id);
// bookmark data item
page_section_data=null;
$.each(data, function(i, val) {
if (val['name']=="page_section[text]")
page_section_data=val;
})
page_section_data['value']=editor.getContent();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment