diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index bd9a32b0d6a9b1b4ff951824ca4757262a38a5dc..216ab6ce4c052d527a459e262187effea77b4f2e 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -280,15 +280,18 @@ RICH_EDITOR.setOutdent = function () { }; RICH_EDITOR.setJustifyLeft = function () { - RICH_EDITOR.editor.style.textAlign = 'left'; + document.execCommand('justifyLeft', false, null); + RICH_EDITOR.editor.setAttribute('style', 'text-align: left;'); }; RICH_EDITOR.setJustifyCenter = function () { - RICH_EDITOR.editor.style.textAlign = 'center'; + document.execCommand('justifyCenter', false, null); + RICH_EDITOR.editor.setAttribute('style', 'text-align: center;'); }; RICH_EDITOR.setJustifyRight = function () { - RICH_EDITOR.editor.style.textAlign = 'right'; + document.execCommand('justifyRight', false, null); + RICH_EDITOR.editor.setAttribute('style', 'text-align: right;'); }; RICH_EDITOR.insertImage = function (url) {