Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#34329 closed defect (bug) (invalid)

Render TinyMCE views before applying wpautop to content

Reported by: danielbachhuber's profile danielbachhuber Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords:
Focuses: Cc:


wpautop is run on BeforeSetContent:

mce views are rendered on SetContent:

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)

#1 @azaozz
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

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:

// When the editor's content has been updated and the DOM has been
// processed, render the views in the document.
editor.on( 'SetContent', function() {
Last edited 8 years ago by azaozz (previous) (diff)
Note: See TracTickets for help on using tickets.