@kaitify/core 0.0.1-beta.27 → 0.0.1-beta.29
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/lib/kaitify-core.es.js +148 -134
- package/lib/kaitify-core.umd.js +1 -1
- package/lib/model/Editor.d.ts +19 -2
- package/package.json +2 -2
- package/lib/model/config/dom-observe.d.ts +0 -10
package/lib/model/Editor.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ import { Selection } from './Selection';
|
|
|
3
3
|
import { History } from './History';
|
|
4
4
|
import { RuleFunctionType } from './config/format-rules';
|
|
5
5
|
import { Extension } from '../extensions';
|
|
6
|
+
/**
|
|
7
|
+
* 非法dom更新数据类型
|
|
8
|
+
*/
|
|
9
|
+
export type EditorObserverUpdateDataType = {
|
|
10
|
+
elm: Node;
|
|
11
|
+
type: 'add' | 'remove' | 'update';
|
|
12
|
+
};
|
|
6
13
|
/**
|
|
7
14
|
* 编辑器获取光标范围内节点数据的类型
|
|
8
15
|
*/
|
|
@@ -491,9 +498,11 @@ export declare class Editor {
|
|
|
491
498
|
*/
|
|
492
499
|
updateRealSelection(): Promise<void>;
|
|
493
500
|
/**
|
|
494
|
-
*
|
|
501
|
+
* 重新渲染编辑器视图
|
|
502
|
+
* 1. 不会触发onChange事件;
|
|
503
|
+
* 2. 不会渲染真实光标
|
|
495
504
|
*/
|
|
496
|
-
review(value: string): Promise<void>;
|
|
505
|
+
review(value: string, unPushHistory?: boolean | undefined): Promise<void>;
|
|
497
506
|
/**
|
|
498
507
|
* 销毁编辑器的方法
|
|
499
508
|
*/
|
|
@@ -510,6 +519,14 @@ export declare class Editor {
|
|
|
510
519
|
* 判断光标是否完全在可视范围内
|
|
511
520
|
*/
|
|
512
521
|
isSelectionInView(): boolean;
|
|
522
|
+
/**
|
|
523
|
+
* 移除对编辑器的dom监听
|
|
524
|
+
*/
|
|
525
|
+
removeDomObserve(): void;
|
|
526
|
+
/**
|
|
527
|
+
* 设置对编辑器的dom监听,主要解决非法dom插入问题
|
|
528
|
+
*/
|
|
529
|
+
setDomObserve(): void;
|
|
513
530
|
/**
|
|
514
531
|
* 配置编辑器,返回创建的编辑器
|
|
515
532
|
*/
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Editor } from '../Editor';
|
|
2
|
-
/**
|
|
3
|
-
* 移除对编辑器的dom监听
|
|
4
|
-
*/
|
|
5
|
-
export declare const removeDomObserve: (editor: Editor) => void;
|
|
6
|
-
/**
|
|
7
|
-
* 设置对编辑器的dom监听,主要解决非法dom插入问题
|
|
8
|
-
* 中文输入和updateView时不会启用dom监听
|
|
9
|
-
*/
|
|
10
|
-
export declare const setDomObserve: (editor: Editor) => void;
|