[wp-trac] [WordPress Trac] #34329: Render TinyMCE views before applying wpautop to content

WordPress Trac noreply at wordpress.org
Wed Jul 20 05:35:21 UTC 2016


#34329: Render TinyMCE views before applying wpautop to content
-----------------------------+----------------------
 Reporter:  danielbachhuber  |       Owner:
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  TinyMCE          |     Version:
 Severity:  normal           |  Resolution:  invalid
 Keywords:                   |     Focuses:
-----------------------------+----------------------
Changes (by azaozz):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 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 the 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() {
         wp.mce.views.render();
 });
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34329#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list