[wp-trac] [WordPress Trac] #39248: TinyMCE JavaScript editor is broken in 4.7

WordPress Trac noreply at wordpress.org
Mon Dec 12 21:50:04 UTC 2016

#39248: TinyMCE JavaScript editor is broken in 4.7
 Reporter:  argonius      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  TinyMCE       |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:  ui, javascript, administration
Changes (by azaozz):

 * keywords:  needs-patch => close


 > The problem happens when you load the page with text editor, after you
 have pre-selected mode to "Text" in previous page load.

 When the Text editor loads first, TinyMCE is not initialized until the
 user switches to Visual. This has always worked that way, hasn't changed
 since 2.5 (or even earlier).

 It is done that way because:
 - There is no good way to initialize TinyMCE "hidden". There is always a
 flicker and some delay on page load. Also often there are errors in
 certain browsers with some components like iframes in wpviews, etc.
 - The page loads faster when the initialization of TinyMCE is postponed
 (despite that it is usually loaded in the footer).

 I'm not sure what you need to do on loading the editor but there are few
 different custom events you can use. One is `tinymce.on( 'addEditor',
 function( editor ) { ...` the other is WordPress specific `$( document
 ).on( 'tinymce-editor-init', function( editor ) { ...`.

Ticket URL: <https://core.trac.wordpress.org/ticket/39248#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list