Ok apparently WordPress keeps track of what kind of editor (visual or html) is active as a class which is added to the content wrapper so here is a solution that will get you the latest content in the editor
function get_tinymce_content(){
if (jQuery("#wp-content-wrap").hasClass("tmce-active")){
return tinyMCE.activeEditor.getContent();
}else{
return jQuery('#html_text_area_id').val();
}
}
Related Posts:
- Creating a wp_editor instance with custom tinyMCE buttons
- Remove HTML editor and visual/HTML tabs from TinyMCE
- Load wp_editor via ajax [duplicate]
- TinyMCE 4.x : How to customize toolbar on wp_editor()
- How to use the new Dashicons for custom TinyMCE buttons?
- Add unique class or ID information to tinyMCE
- TinyMCE Anchor Button not showing
- “wp_editor” not displaying TinyMCE correctly when square brackets used in name
- Secure Validation of wp_editor in Theme Options
- Tiny MCE not adding p tag when saving theme option
- TinyMCE Editor Set Default Tab
- Registering custom TinyMCE buttons, for admin area, to work with custom instances of wp_editor
- Remove quicktag buttons but not Visual / Text editor and tabs
- TinyMCE editor – new lines not rendered on front end
- How to get WP editors tinyMCE instances
- TinyMCE strips line breaks on mceAddControl
- Count Words using tinymce in the front-end
- tinyMCE.activeEditor = null WP editor loaded in ‘Text’ mode?
- Add table controls with wp_editor minimal editor configuration (‘teeny’)
- Change Default Font Size and Remove Unwanted Font Sizes in TinyMCE
- TinyMCE Plugin Parameter
- wpeditor issue – shows both mode and not able to focus/edit during visual mode
- wp_editor on input changes content
- Limit Block format tags in WordPress wp_editor
- How to remove the statusbar from the default wordpress editor?
- wp.editor.initialize does not show the same default toolbar
- Stop WordPress Visual Editor converting backticks into code blocks
- TinyMCE Editor change underline button behavior – u tag instead of span text-decoration underline
- wordpress qtranslate editor text is not working [closed]
- Is it possible to disable the image alignment options in the post editor?
- How to dynamically generate wordpress editor on frontend?
- Change syntax styling of TinyMCE HTML Text Editor
- More than one TinyMCE (wp_editor) with different $settings[‘drag_drop_upload’] values breaks
- Adding custom styles to elements, without creating new elements
- wp_editor not modify html tags of initial content
- allowing all HTML tags in tinymce editor
- How to apply a custom skin to WP_Editor / TinyMCE?
- Stop editor from adding “amp;” after every “&”
- TinyMCE 4 & wp_editor multiple editor issue
- How to remove buttons from tinyMCE in wp_editor added via AJAX
- Loading a self-hosted custom @font-face into TinyMCE dropdowns (Classic Editor) via ‘tiny_mce_before_init’ filter
- Load WordPress Editor .css on Front End
- “Formats” Select Menu in WP Editor doesn’t show up with correct colour
- WordPress Editor without buttons
- Adding a class to custom TinyMCE button using WPLinks dialog box
- How to remove “justifyfull” in TinyMCE
- wp_editor Too Tall when Content is Loaded
- Inline Editing with wp_editor and tinymce (problem with textarea)
- Adding New Row of Custom TinyMCE
- How to add placeholder in wp_editor?
- How to add “Insert/Edit link” button in custom popup tinymce window?
- How to disable TinyMCE from removing span tags
- WordPress 3.2 has broken my TinyMCE code
- wp_editor disable after reaching character count limit
- Is it possible to create nested lists in the WYSIWYG editor?
- Add a button to tinyMCE editor on Custom Post Type
- HTML5, WordPress and Tiny MCE issue – wrapping anchor tag around div results in funky output
- TinyMCE style_select – Append Classes
- Adding TinyMCE custom buttons when using teeny_mce_before_init
- Disabling TinyMCE keyboard shortcuts altogether
- Should the WP post editor B (bold) button be inserting a tag instead of in HTML5?
- TinyMCE Keyup Function
- TinyMCE Editor removing and and putting instead
- Add TinyMCE editor to windowManager textbox
- unwanted and tags in text editor
- Custom settings page TinyMce: no formatting when echoing value of editor
- Convert textarea with wp_editor
- How to reset ‘Advance’ tab on table property?
- Add drop down in wordpress tiny mce editor pop up
- TinyMCE Advanced list type drop-down
- editor text cut off when using 2 spaces (after periods)
- Advanced tinyMCE insert link error [closed]
- How to reference TinyMCE body in my script
- How to prevent shortcode preview from breaking in tinymce editor?
- Custom TinyMCE Editor Formats in Dropdown
- Why is the media upload button not in the main toolbar & can it be placed there instead?
- Can I disable `wp-tinymce.php` load as script?
- wp_editor – Media uploader button to tinymce
- Editor html formatting is different from view source
- WordPress no longer holding post formatting
- HTML formatting issues when switching between editor tabs
- TinyMCE Advances is removing blanks (” “)
- enable TinyMCE for comment forms
- TinyMCE – Insert media at the beginning of post
- Adding a Media Button to the WordPress Content Editor
- clasic editor – article categories customization?
- Replace text by icon in TinyMCE toolbar
- TinyMCE Advanced Link Class List on the main editor
- Error in backend: Failed to load plugin: tabfocus from url
- How to force wp excerpt to use br tag?
- Tinymce doesnt appear
- TinyMCE errors after 3.7.1 to 3.9.1 upgrade
- Make videos output as iframes not links
- How to insert image from link in TinyMCE
- Tinymce broken after update
- Problem with Line spacing in wysiwyg editor in WP 3.5.1
- get backend to front end
- Why did my get mangled, and how can I keep from happening again?
- How to create custom toggle button in tinymce?
- How to load TinyMce cloud editor in WordPress with wp_editor()?