X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b35b62d59ff057ce5cfbc5fb463431b086f5c830..refs/pull/5676/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) {