Opened 12 years ago
Closed 12 years ago
#30565 closed defect (bug) (fixed)
WordPress 4.1 is not firing Justify ExecCommands
| Reported by: | programmin | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | TinyMCE | Version: | 4.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | ui, javascript |
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
@
12 years ago
- Summary Wordpress 4.1 is not firing Justify ExecCommands → WordPress 4.1 is not firing Justify ExecCommands
#3
@
12 years ago
- Milestone Awaiting Review → 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You can see the expected behavior here http://www.tinymce.com/tryit/inline.php - after running:
tinymce.activeEditor.on('ExecCommand',function(evt) { console.log(evt); })It logs every time align button is clicked - both for selected image and selected text.