Hey, I've got a mix of TinyMCE jQuery plugin and Jeditable on a textarea. What happens is, when the editable element is clicked it turns into a TinyMCE iframe. Now, my challenge is to get the content from the iframe back to the textarea using tinymce.triggerSave() BEFORE the form is ajaxed.
Any thoughts or ideas on this?
function editNote(){
$('.edit').editable('<?php echo base_url(); ?>index.php/notes/edit', {
type : 'textarea',
onblur : 'ignore',
cancel : 'Cancel',
submit : 'OK',
indicator : "<img src='<?php echo base_url(); ?>css/images/indicator.gif'>",
tooltip : 'Click to edit...'
});
}
$('.edit').live('click', function(){
editNote();
$('textarea').tinymce({
// Location of TinyMCE script
script_url : '<?php echo base_url(); ?>js/tiny_mce/tiny_mce.js',
// General options
theme : "simple"
});
});
The provided code initiates the editNote function and then executes the TinyMCE JavaScript.
I'm trying to figure out how to execute tinyMCE.triggerSave(); BEFORE the jeditable form is submitted. Essentially, looking for a pre-submission solution.
Thank you,
Billy