User tests: Successful: Unsuccessful:
Pull Request for Issue #17665 .
This PR introduces one more method to our Joomla.Editors API:
getSelection() { /* return the current selection */ }
Why?
Well it's a missing piece of the puzzle but mainly because it allows DEVs to do more advanced stuff instead of always replacing some selected text.
As this is a PR for the issue linked above, the menu button is the only place where this API is used at the moment. Also this part (in media/com_menus/js/admin-items-modal.js might be removed depending on the decision about B/C break, check the notes bellow)
Apply patch select some text in the editor and then through the menu button (xtd_button) try to insert a link! The link will have as text the selected text in the editor instead of the default menu name.
Repeat the process for all three core editors: none, tinyMCE and codemirror
When you link to menu items etc, if you highlight text and link it the selected text gets replaced.
When you link to menu items etc, if you highlight text and link it the selected text becomes the link text.
This PR is not breaking any API but it changes the behaviour. Eg
@mbabker @wilsonge please make up your mind on the B/C here
@tonypartridge this one is for you
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript External Library |
Labels |
Added:
?
|
I'm happy with this new proposed behaviour. Is there a reason we don't have an implementation for codemirror?
Is there a reason we don't have an implementation for codemirror
Yes! Basically the Joomla's API for the editors is a one to one match for the some public functions of code mirror (naming methods is hard
Cool. One test here and I'm happy
I have tested this item
Tested fine here also in multilingual
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-12-06 13:24:34 |
Closed_By | ⇒ | wilsonge |
Dimitris my hero! Personally I don’t think it’s a BC Break as nothing is breaking but changing for the better in the way it’s always been assumed it should work....
On 3 Dec 2018, 19:21 +0000, dGrammatiko notifications@github.com, wrote: