[wp-trac] [WordPress Trac] #45338: Gutenberg classic editor block is not showing custom mce buttons

WordPress Trac noreply at wordpress.org
Tue Nov 13 21:39:15 UTC 2018


#45338: Gutenberg classic editor block is not showing custom mce buttons
-----------------------------+---------------------
 Reporter:  junixdev         |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  5.0
Component:  Editor           |     Version:  5.0
 Severity:  normal           |  Resolution:
 Keywords:  has-screenshots  |     Focuses:
-----------------------------+---------------------

Comment (by azaozz):

 The problem is that the TinyMCE settings filters for the classic block are
 in `wp_default_packages_inline_scripts()`
 ([https://core.trac.wordpress.org/browser/branches/5.0/src/wp-includes
 /script-loader.php#L603 here]) which runs on the action
 `wp_default_scripts`
 ([https://core.trac.wordpress.org/browser/branches/5.0/src/wp-includes
 /default-filters.php#L492 here]), which is fired as soon as `class
 WP_Scripts` is initialized and then at `init` 0
 ([https://core.trac.wordpress.org/browser/branches/5.0/src/wp-
 includes/class.wp-scripts.php#L125 here]).

 Previously they were running quite later, near the end of the page where
 the TinyMCE scripts were printed.

 Looks like we will have to move that "down" again, and will have to `echo`
 the `wpEditorL10n` init object. Won't be able to use
 `add_inline_script()`, etc. At this point may be easier if we just reuse
 class-wp-editor.php to output that, no need to duplicate the code? Or can
 make another function in script-loader just for that and echo the settings
 on a later action? @pento @atimmer any ideas/thoughts?

 (BTW why is it called `wpEditorL10n` anyway?) :)

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


More information about the wp-trac mailing list