mirror of
https://gitee.com/openharmony/applications_notes
synced 2024-12-04 05:49:30 +00:00
fix indent bug
Signed-off-by: zhanghongchuan33 <zhanghongchuan6@huawei.com>
This commit is contained in:
parent
4cb8d4dd51
commit
d866d18c94
@ -219,12 +219,23 @@ RICH_EDITOR.execFontSize = function (size, unit) {
|
||||
fontElements.style.fontSize = size + 'px'
|
||||
};
|
||||
|
||||
var pad = 24
|
||||
RICH_EDITOR.setIndent = function() {
|
||||
document.execCommand('indent', false, null);
|
||||
var parents = document.getElementById('editorjs')
|
||||
parents.removeAttribute('padding-left');
|
||||
pad = pad + 24
|
||||
parents.style.paddingLeft = pad + 'px'
|
||||
}
|
||||
|
||||
RICH_EDITOR.setOutdent = function() {
|
||||
document.execCommand('outdent', false, null);
|
||||
var parents = document.getElementById('editorjs')
|
||||
parents.removeAttribute('padding-left');
|
||||
if (pad == 24) {
|
||||
parents.style.paddingLeft = 24 + 'px'
|
||||
} else {
|
||||
pad = pad - 24
|
||||
parents.style.paddingLeft = pad + 'px'
|
||||
}
|
||||
}
|
||||
|
||||
RICH_EDITOR.setJustifyLeft = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user