Last active
September 29, 2016 23:57
-
-
Save shizhua/f7c48432005581880723 to your computer and use it in GitHub Desktop.
Get the input content of TinyMCE editor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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