Hi I have a mix of tinyMCE jquery plugin and jeditable on a textarea. When the editable element is clicked it is turned into a tinymce iframe. Now I need to pass the iframe content back to the textarea using tinymce.triggerSave() BEFORE the form is ajaxed.
Anyone any idea?
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 code above calls the editNote function and then the tinymce js.
I'm looking for a way to run tinyMCE.triggerSave(); BEFORE the jeditable form is submitted. So something like the opposite of callback.
Thanks,
Billy