!291 修复备忘录内容对齐失效

Merge pull request !291 from yuandongping/fix_bug
This commit is contained in:
openharmony_ci 2024-09-18 11:53:21 +00:00 committed by Gitee
commit 3eaa912672
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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) {