|
|
@@ -2479,7 +2479,7 @@ Vue.component('spaceEditor', {
|
|
|
if (result.messages && result.messages.length) {
|
|
|
wordUi.showMessage('warning', 'Word 已导入,少量复杂格式可能需要人工检查。');
|
|
|
} else {
|
|
|
- wordUi.showMessage('success', 'Word 文件已导入正文,原有字体和字号已尽量保留;未指定格式的文字使用仿宋_GB2312、20pt。');
|
|
|
+ wordUi.showMessage('success', 'Word 文件已导入正文,原有段落格式已尽量保留;未指定格式的段落使用仿宋_GB2312、20pt、首行缩进2字符。');
|
|
|
}
|
|
|
}.bind(this))
|
|
|
.catch(function (error) {
|
|
|
@@ -2558,6 +2558,8 @@ Vue.component('spaceEditor', {
|
|
|
var textIndent = node.style && node.style.textIndent;
|
|
|
if (textIndent && !/^0(?:px|pt|em|%)?$/i.test(textIndent.trim())) {
|
|
|
node.style.textIndent = '2em';
|
|
|
+ } else if (!textIndent && /^(P|LI|BLOCKQUOTE)$/i.test(node.tagName)) {
|
|
|
+ node.style.textIndent = '2em';
|
|
|
}
|
|
|
if (node.getAttribute && node.getAttribute('align')) {
|
|
|
node.style.textAlign = node.getAttribute('align');
|
|
|
@@ -2647,6 +2649,9 @@ Vue.component('spaceEditor', {
|
|
|
firstBlock = writer.appendElement('paragraph', root);
|
|
|
}
|
|
|
writer.setSelection(firstBlock, 'in');
|
|
|
+ if (editor.model.schema.checkAttribute(firstBlock.name, 'textIndent')) {
|
|
|
+ writer.setAttribute('textIndent', '2em', firstBlock);
|
|
|
+ }
|
|
|
});
|
|
|
editor.execute('fontFamily', { value: this.defaultEditorFontFamily });
|
|
|
editor.execute('fontSize', { value: this.defaultEditorFontSize });
|