#34329 closed defect (bug) (invalid)
Render TinyMCE views before applying wpautop to content
Reported by: | danielbachhuber | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
wpautop
is run on BeforeSetContent
: https://core.trac.wordpress.org/browser/tags/4.3/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js#L115
mce views are rendered on SetContent
: https://core.trac.wordpress.org/browser/tags/4.3/src/wp-includes/js/tinymce/plugins/wpview/plugin.js#L223
When using mce views to render shortcode previews, our render callback receives the full shortcode with wpautop
unexpectedly applied. I'd expect to have the shortcode without wpautop
yet applied, as is the behavior when rendering shortcodes on the_content
Change History (1)
Note: See
TracTickets for help on using
tickets.
Don't think this is possible.
wpautop()
is run on the HTML string before it is loaded in the editor. To initialize wpView we need the editor DOM that was created by loading that HTML string.See the note in the code: