@hailin-zheng/editor-core 2.2.4 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index-cjs.js +9 -6
- package/index-cjs.js.map +1 -1
- package/index.js +9 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -16667,11 +16667,6 @@ class DocumentInput {
|
|
16667
16667
|
if (evt.defaultPrevented) {
|
16668
16668
|
return;
|
16669
16669
|
}
|
16670
|
-
const keyEvent = new KeyboradElementEvent(this.docCtx);
|
16671
|
-
keyEvent.sourceEvent = evt;
|
16672
|
-
if (DocumentEvent.invokeEvent('ElementKeyDown', this.docCtx.selectionState.startControl, keyEvent, 'All')) {
|
16673
|
-
return;
|
16674
|
-
}
|
16675
16670
|
// if (!this.docCtx.selectionState.editable) {
|
16676
16671
|
// return;
|
16677
16672
|
// }
|
@@ -17046,6 +17041,8 @@ class DocumentChange {
|
|
17046
17041
|
if (text.props.fontSize !== this.viewOptions.currentFontSize || text.props.fontName !== this.viewOptions.currentFontName) {
|
17047
17042
|
//创建新输入项
|
17048
17043
|
const newInput = this.createNewInputText();
|
17044
|
+
this.viewOptions.currentFontName = newInput.props.fontName;
|
17045
|
+
this.viewOptions.currentFontSize = newInput.props.fontSize;
|
17049
17046
|
//插入到文档
|
17050
17047
|
this.insertElement(element, offset, [newInput]);
|
17051
17048
|
this.correctInputEle(newInput, '', 0, data);
|
@@ -21896,7 +21893,7 @@ class DocEditor {
|
|
21896
21893
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
21897
21894
|
}
|
21898
21895
|
version() {
|
21899
|
-
return "2.2.
|
21896
|
+
return "2.2.6";
|
21900
21897
|
}
|
21901
21898
|
switchPageHeaderEditor() {
|
21902
21899
|
this.docCtx.document.switchPageHeaderEditor(this.selectionState, null);
|
@@ -22063,6 +22060,12 @@ class DocEditor {
|
|
22063
22060
|
}
|
22064
22061
|
}
|
22065
22062
|
processKeyDownEvent(evt) {
|
22063
|
+
const keyEvent = new KeyboradElementEvent(this.docCtx);
|
22064
|
+
keyEvent.sourceEvent = evt;
|
22065
|
+
if (DocumentEvent.invokeEvent('ElementKeyDown', this.docCtx.selectionState.startControl, keyEvent, 'All')) {
|
22066
|
+
evt.preventDefault();
|
22067
|
+
return;
|
22068
|
+
}
|
22066
22069
|
if (evt.keyCode === 38 || evt.keyCode === 40) {
|
22067
22070
|
if (this.docCtx.suggestions.prepareSuggestions.length) {
|
22068
22071
|
this.onSuggestionsKeydown(evt);
|