@hailin-zheng/editor-core 2.0.49 → 2.0.51
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/README.md +55 -34
- package/index-cjs.js +15 -1
- package/index-cjs.js.map +1 -1
- package/index.js +15 -1
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +10 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -26950,6 +26950,7 @@ class DocEditor {
|
|
26950
26950
|
selectionChanged = new Subject$1();
|
26951
26951
|
beforeRenderSubject = new Subject$1();
|
26952
26952
|
afterRenderSubject = new Subject$1();
|
26953
|
+
onBeforeSetCursorSubject = new Subject$1();
|
26953
26954
|
contentChanged = new Subject$1();
|
26954
26955
|
onShouldRender = new Subject$1();
|
26955
26956
|
selectionState;
|
@@ -27352,6 +27353,13 @@ class DocEditor {
|
|
27352
27353
|
* @returns
|
27353
27354
|
*/
|
27354
27355
|
canSetCursor() {
|
27356
|
+
//判断当前光标是否可以放置,可以设置返回true,否则返回false
|
27357
|
+
//用法:合并病程录,分开处理多个病程录录入权限
|
27358
|
+
const event = { result: true, ss: this.selectionState };
|
27359
|
+
this.onBeforeSetCursorSubject.next(event);
|
27360
|
+
if (!event.result) {
|
27361
|
+
return false;
|
27362
|
+
}
|
27355
27363
|
const { startControl, startOffset, editable } = this.selectionState;
|
27356
27364
|
return ElementUtil.canSetCursor(startControl, startOffset, editable, this.viewOptions);
|
27357
27365
|
}
|
@@ -27527,6 +27535,12 @@ class DocEditor {
|
|
27527
27535
|
const tb = TableUtil.createTable(rows, cols, this.selectionState);
|
27528
27536
|
this.documentChange.insertTable(tb);
|
27529
27537
|
}
|
27538
|
+
/**
|
27539
|
+
* 插入软换行符
|
27540
|
+
*/
|
27541
|
+
insertSoftBr() {
|
27542
|
+
this.documentChange.insertSoftBr();
|
27543
|
+
}
|
27530
27544
|
/**
|
27531
27545
|
* 打印所有文档
|
27532
27546
|
*/
|
@@ -28338,7 +28352,7 @@ class DocEditor {
|
|
28338
28352
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
28339
28353
|
}
|
28340
28354
|
version() {
|
28341
|
-
return "2.0.
|
28355
|
+
return "2.0.51";
|
28342
28356
|
}
|
28343
28357
|
}
|
28344
28358
|
|