I’m working on a shortcodes preview filter where I wrap all of my shortcodes in CSS classed divs that are only intended to be viewed while the content is inside the tinyMCE editor.
The first challenge I have is how to strip out the wrapper divs from the markup prior to the document being saved.
The second challenge is how to reapply the wrappers each time a shortcode appears within the editor after a save.
I’m looking for an example of using jQuery to parse and filter TinyMCE editor contents on load and during save routines.
This one is easy. Just give your wrapperDivs a special class
This one is more difficult to answer. That depends on the difficulty to detect a shortcode.