[wp-trac] [WordPress Trac] #33301: Create and edit links inline

WordPress Trac noreply at wordpress.org
Mon Feb 29 15:46:18 UTC 2016


#33301: Create and edit links inline
-------------------------+-------------------------------------------------
 Reporter:  iseulde      |       Owner:  azaozz
     Type:  task         |      Status:  assigned
  (blessed)              |   Milestone:  4.5
 Priority:  normal       |     Version:
Component:  Editor       |  Resolution:
 Severity:  normal       |     Focuses:  ui, accessibility, javascript,
 Keywords:  needs-patch  |  administration
-------------------------+-------------------------------------------------

Comment (by jadpm):

 Since [https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/js/wplink.js?rev=36677/ 36677] the `wplink.js` script is directly
 dependent from the global `tinymce`. Before that, that global was indeed
 declared but we checked against its existence when used in the `open`
 method - the only place where it was used indeed.

 That has caused a regression in some implementations, and I am thinking
 about Quicktags. By its own inline documentation,
 >This (quicktags.js) is the HTML editor in WordPress. It can be attached
 to any textarea and will.
 From now on, adding Quicktags with a link button to a custom HTML textarea
 outside the editor pages lacks the global `tinymce` unless the target
 script is added also as a dependency. Ys, Quicktags do not have
 `wplink.js` as a dependency either, since link buttons are not mandatory
 on a quicktags toolbar, but one would expect that when loading ths script
 it can be used as-is. That is not the case anyore.

 So, as a summary, we might want to consider that there are some
 implementations where `wplink` is used on admin pages where tinyMCE is not
 loaded or even needed.

 In my opinion, we should either add the `tinymce` script as an actual
 dependency to `wplink.js` so it loads automatically, wrap all its related
 functionality in checks like it did before or move all the related code to
 another proper script.

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


More information about the wp-trac mailing list