// get the content of tinyMCEed textarea and put it into previewText to send by myself

let mainTextarea = $(this).prevAll("textarea");
let mainTextareaID = $(mainTextarea).attr('id');

tinyMCE.get(mainTextareaID).focus();
let previewText = tinyMCE.activeEditor.getContent();

$('#text').val(previewText);
$('#editDay_submit').click();

 

Leave a Reply

Your email address will not be published.