X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/5a4f59534124a83b9d7b54abe1d5c8984b2fa04f..refs/pull/5721/head:/resources/js/wysiwyg-tinymce/fixes.js diff --git a/resources/js/wysiwyg-tinymce/fixes.js b/resources/js/wysiwyg-tinymce/fixes.js index b6d627ff7..9e5cce43c 100644 --- a/resources/js/wysiwyg-tinymce/fixes.js +++ b/resources/js/wysiwyg-tinymce/fixes.js @@ -144,11 +144,13 @@ export function handleTableCellRangeEvents(editor) { cell.removeAttribute('align'); cleanChildAlignment(cell); }, - JustifyRight: this.JustifyLeft, - JustifyCenter: this.JustifyLeft, - JustifyFull: this.JustifyLeft, }; + // Copy justify left action to other alignment actions + actionByCommand.JustifyRight = actionByCommand.JustifyLeft; + actionByCommand.JustifyCenter = actionByCommand.JustifyLeft; + actionByCommand.JustifyFull = actionByCommand.JustifyLeft; + editor.on('ExecCommand', event => { const action = actionByCommand[event.command]; if (action) {