[wp-trac] [WordPress Trac] #45893: tinyMCEPreInit.load_ext() isn't called for TinyMCE external plugins in block editor

WordPress Trac noreply at wordpress.org
Thu Jan 10 00:21:58 UTC 2019


#45893: tinyMCEPreInit.load_ext() isn't called for TinyMCE external plugins in
block editor
-----------------------------+----------------------------
 Reporter:  danielbachhuber  |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Future Release
Component:  Editor           |    Version:  5.0
 Severity:  normal           |   Keywords:  dev-feedback
  Focuses:                   |
-----------------------------+----------------------------
 In the Classic Editor, a TinyMCE plugin registered with the
 {{{mce_external_plugins}}} filter will be loaded with the following:

 {{{
 <script type='text/javascript' src='http://tastyrecipes.test/wp-
 includes/js/tinymce/langs/wp-langs-en.js?ver=4800-20180716'></script>
 <script type="text/javascript">

 tinyMCEPreInit.load_ext("http://tastyrecipes.test/wp-content/plugins
 /tasty-links/assets/js", "en");


 ( function() {
         var init, id, $wrap;
 }}}

 This is generated in `WP_Editor`:
 * https://core.trac.wordpress.org/browser/tags/5.0/src/wp-includes/class-
 wp-editor.php#L507
 * https://core.trac.wordpress.org/browser/tags/5.0/src/wp-includes/class-
 wp-editor.php#L1529

 The block editor's {{{wp_tinymce_inline_scripts()}}} doesn't perform the
 same, which means TinyMCE external plugins aren't executed for editor
 instances on the page (only the Classic Block instances).

 I'm not sure whether this was intentional or unintentional, or even what
 the expected behavior is!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45893>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list