Skip to content

Instantly share code, notes, and snippets.

@shizhua
Last active September 29, 2016 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shizhua/f7c48432005581880723 to your computer and use it in GitHub Desktop.
Save shizhua/f7c48432005581880723 to your computer and use it in GitHub Desktop.
Get the input content of TinyMCE editor
function get_tinymce_content(){
if (jQuery("#wp-editor_id-wrap").hasClass("tmce-active")){
return tinyMCE.activeEditor.getContent();
}else{
return jQuery('#html_text_area_id').val();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment