Opened 10 years ago
Closed 10 years ago
#30565 closed defect (bug) (fixed)
WordPress 4.1 is not firing Justify ExecCommands
Reported by: | programmin | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | ui, javascript | Cc: |
Description
In pre-4.1, you could catch attempts to align anything with:
ed.onExecCommand.add(function(editor, command) { //command is JustifyCenter, JustifyLeft, JustifyRight, etc. }
This let scripts know when user aligned anything. However, in 4.1 beta it calls the execCommand when text is selected and align left/center/right button is clicked, but never when an image is selected and the left/center/right button is clicked.
Perhaps something in the new pop-up-alignment image toolbar is interfering?
Attachments (1)
Change History (7)
#2
@
10 years ago
- Summary changed from Wordpress 4.1 is not firing Justify ExecCommands to WordPress 4.1 is not firing Justify ExecCommands
#3
@
10 years ago
- Milestone changed from Awaiting Review to 4.1
We used to only preventDefault for images wrapped in a caption. Now we do it for any image.
[30318], #30147,
https://github.com/tinymce/tinymce/blob/master/js/tinymce/classes/Editor.js#L1400
Note: See
TracTickets for help on using
tickets.
You can see the expected behavior here http://www.tinymce.com/tryit/inline.php - after running:
It logs every time align button is clicked - both for selected image and selected text.