TinyMCE: manually fire ExecCommand when aligning images as we do preventDefault() on BeforeExecCommand for them. Props avryl, fixes #30565.

git-svn-id: https://develop.svn.wordpress.org/trunk@30748 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-12-06 00:32:18 +00:00
parent a3367bcee3
commit 6f43327574

View File

@ -335,7 +335,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
editor.on( 'init', function() { editor.on( 'init', function() {
editor.dom.bind( editor.getWin(), 'scroll', hide ); editor.dom.bind( editor.getWin(), 'scroll', hide );
}); });
editor.on( 'blur hide', hide ); editor.on( 'blur hide', hide );
// 119 = F8 // 119 = F8
@ -1124,6 +1124,12 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
if ( floatingToolbar ) { if ( floatingToolbar ) {
floatingToolbar.reposition(); floatingToolbar.reposition();
} }
editor.fire( 'ExecCommand', {
command: cmd,
ui: event.ui,
value: event.value
} );
} }
}); });