@hailin-zheng/editor-core 2.2.3 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- package/editor.css +694 -610
- package/index-cjs.d.ts +32 -31
- package/index-cjs.js +22649 -22205
- package/index-cjs.js.map +1 -1
- package/index.d.ts +32 -31
- package/index.js +22647 -22207
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +493 -464
- package/med_editor/doc-rule.d.ts +46 -46
- package/med_editor/editor-core.d.ts +21 -21
- package/med_editor/framework/code-interpreter/ast-parser.d.ts +4 -4
- package/med_editor/framework/code-interpreter/document-eval-func.d.ts +18 -18
- package/med_editor/framework/code-interpreter/dynamic-execute.d.ts +23 -23
- package/med_editor/framework/doc-layout/document-arrange.d.ts +86 -86
- package/med_editor/framework/doc-layout/paragraph-arrange.d.ts +107 -107
- package/med_editor/framework/document-change.d.ts +314 -295
- package/med_editor/framework/document-combine.d.ts +24 -24
- package/med_editor/framework/document-comment.d.ts +38 -38
- package/med_editor/framework/document-context.d.ts +138 -133
- package/med_editor/framework/document-event.d.ts +251 -251
- package/med_editor/framework/document-input-cursor.d.ts +32 -43
- package/med_editor/framework/document-paginator.d.ts +46 -46
- package/med_editor/framework/document-svg.d.ts +36 -36
- package/med_editor/framework/document-template.d.ts +13 -13
- package/med_editor/framework/document-textline-mode.d.ts +6 -6
- package/med_editor/framework/element-define.d.ts +413 -409
- package/med_editor/framework/element-event-define.d.ts +104 -107
- package/med_editor/framework/element-props.d.ts +343 -343
- package/med_editor/framework/element-reader.d.ts +20 -20
- package/med_editor/framework/element-serialize.d.ts +36 -36
- package/med_editor/framework/element-type-handler.d.ts +8 -9
- package/med_editor/framework/history/element-trace-manage.d.ts +107 -107
- package/med_editor/framework/history/element-trace-tracking.d.ts +89 -89
- package/med_editor/framework/impl/checkbox/checkbox-impl.d.ts +19 -19
- package/med_editor/framework/impl/comments/comment-content-impl.d.ts +39 -39
- package/med_editor/framework/impl/comments/comment-element-impl.d.ts +24 -24
- package/med_editor/framework/impl/comments/comments-container-impl.d.ts +19 -19
- package/med_editor/framework/impl/comments/validate-msg-impl.d.ts +19 -19
- package/med_editor/framework/impl/data-element/data-container-impl.d.ts +25 -0
- package/med_editor/framework/impl/data-element/data-decorate-impl.d.ts +15 -15
- package/med_editor/framework/impl/data-element/data-element-barcode.d.ts +32 -32
- package/med_editor/framework/impl/data-element/data-element-base-impl.d.ts +96 -96
- package/med_editor/framework/impl/data-element/data-element-check-impl.d.ts +26 -26
- package/med_editor/framework/impl/data-element/data-element-date-impl.d.ts +23 -23
- package/med_editor/framework/impl/data-element/data-element-group-impl.d.ts +17 -17
- package/med_editor/framework/impl/data-element/data-element-image-impl.d.ts +23 -23
- package/med_editor/framework/impl/data-element/data-element-list-impl.d.ts +21 -21
- package/med_editor/framework/impl/data-element/data-element-text-impl.d.ts +22 -22
- package/med_editor/framework/impl/data-element/qrcode.d.ts +93 -93
- package/med_editor/framework/impl/decorate/fill-null-space-imple.d.ts +16 -16
- package/med_editor/framework/impl/document/doc-body-impl.d.ts +19 -19
- package/med_editor/framework/impl/document/doc-body-part-impl.d.ts +22 -22
- package/med_editor/framework/impl/document/doc-container-impl.d.ts +7 -7
- package/med_editor/framework/impl/document/doc-footer-impl.d.ts +19 -19
- package/med_editor/framework/impl/document/doc-header-impl.d.ts +19 -19
- package/med_editor/framework/impl/document/doc-impl.d.ts +72 -72
- package/med_editor/framework/impl/index.d.ts +40 -39
- package/med_editor/framework/impl/media-formula/menstrual-history.d.ts +31 -31
- package/med_editor/framework/impl/media-formula/permanent-teeth.d.ts +34 -34
- package/med_editor/framework/impl/paragraph/p-impl.d.ts +38 -38
- package/med_editor/framework/impl/picture/RectEle.d.ts +44 -44
- package/med_editor/framework/impl/picture/image-impl.d.ts +24 -24
- package/med_editor/framework/impl/radio/radio-impl.d.ts +17 -17
- package/med_editor/framework/impl/svg/svg-impl.d.ts +20 -20
- package/med_editor/framework/impl/symbol/br-symbol-impl.d.ts +18 -18
- package/med_editor/framework/impl/symbol/p-symbol-impl.d.ts +16 -16
- package/med_editor/framework/impl/symbol/page-br-symbol-impl.d.ts +20 -20
- package/med_editor/framework/impl/symbol/tab-symbol-impl.d.ts +15 -15
- package/med_editor/framework/impl/table/table-cell-impl.d.ts +34 -34
- package/med_editor/framework/impl/table/table-impl.d.ts +49 -49
- package/med_editor/framework/impl/table/table-row-impl.d.ts +27 -27
- package/med_editor/framework/impl/table/table-split-cell-patch.d.ts +20 -20
- package/med_editor/framework/impl/table/table-split-cell.d.ts +93 -92
- package/med_editor/framework/impl/table/table-util.d.ts +180 -180
- package/med_editor/framework/impl/text/text-impl.d.ts +34 -34
- package/med_editor/framework/impl/text/track-run-impl.d.ts +27 -27
- package/med_editor/framework/infrastructure/event-subject.d.ts +57 -56
- package/med_editor/framework/infrastructure/notify.d.ts +13 -13
- package/med_editor/framework/print/document-print-offscreen.d.ts +58 -58
- package/med_editor/framework/print/document-print.d.ts +18 -18
- package/med_editor/framework/render-context.d.ts +111 -111
- package/med_editor/framework/render-define.d.ts +141 -141
- package/med_editor/framework/selection/document-selection.d.ts +92 -91
- package/med_editor/framework/selection/range-util.d.ts +36 -36
- package/med_editor/framework/selection/selection-overlays.d.ts +32 -32
- package/med_editor/framework/suggestions/input-suggestions.d.ts +29 -0
- package/med_editor/framework/util/adjust-viewport-elements.d.ts +12 -12
- package/med_editor/framework/util/common-util.d.ts +76 -76
- package/med_editor/framework/util/document-segmenter.d.ts +2 -2
- package/med_editor/framework/util/element-util.d.ts +410 -410
- package/med_editor/framework/vnode/editor-calendar-vnode.d.ts +42 -42
- package/package.json +19 -19
@@ -1,295 +1,314 @@
|
|
1
|
-
import { DocumentInput, InputData } from "./document-input-cursor";
|
2
|
-
import { SelectionState } from "./selection/document-selection";
|
3
|
-
import { Element, LeafElement, SelectionContentRange } from "./element-define";
|
4
|
-
import { ParagraphElement, TableElement, TextGroupElement, TrackRunTypeEnum } from "./impl";
|
5
|
-
import { ParagraphNumberType, ParagraphProps, TextProps } from "./element-props";
|
6
|
-
import { ElementReader } from "./element-reader";
|
7
|
-
import { EditorContext } from "./document-context";
|
8
|
-
import { DocumentComment } from "./document-comment";
|
9
|
-
/**
|
10
|
-
* 文档内容改变
|
11
|
-
*/
|
12
|
-
export declare class DocumentChange {
|
13
|
-
private eleReader;
|
14
|
-
private docCtx;
|
15
|
-
private docComment;
|
16
|
-
private documentInput;
|
17
|
-
private selectionState;
|
18
|
-
private viewOptions;
|
19
|
-
constructor(eleReader: ElementReader, docCtx: EditorContext, docComment: DocumentComment, documentInput: DocumentInput);
|
20
|
-
newInput(data: InputData): void;
|
21
|
-
|
22
|
-
|
23
|
-
*
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
*
|
29
|
-
*
|
30
|
-
*
|
31
|
-
* @param
|
32
|
-
* @
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
*
|
38
|
-
* @param
|
39
|
-
* @
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
*
|
45
|
-
* @param
|
46
|
-
* @param
|
47
|
-
* @
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
*
|
53
|
-
* @param
|
54
|
-
* @param
|
55
|
-
* @
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
*
|
61
|
-
* @param
|
62
|
-
* @
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
*
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
*
|
73
|
-
* @param
|
74
|
-
* @
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
*
|
80
|
-
* @
|
81
|
-
|
82
|
-
|
83
|
-
private
|
84
|
-
private
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
*
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
private
|
99
|
-
private
|
100
|
-
|
101
|
-
|
102
|
-
*
|
103
|
-
* @param
|
104
|
-
* @
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
*
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
*
|
115
|
-
* @param
|
116
|
-
* @
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
*
|
122
|
-
* @
|
123
|
-
|
124
|
-
|
125
|
-
private
|
126
|
-
private
|
127
|
-
|
128
|
-
|
129
|
-
*
|
130
|
-
* @param
|
131
|
-
* @
|
132
|
-
|
133
|
-
|
134
|
-
private
|
135
|
-
|
136
|
-
|
137
|
-
*
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
private
|
145
|
-
private
|
146
|
-
/**
|
147
|
-
*
|
148
|
-
* @
|
149
|
-
|
150
|
-
|
151
|
-
private
|
152
|
-
/**
|
153
|
-
*
|
154
|
-
* @param
|
155
|
-
* @
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
*
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
*
|
168
|
-
*/
|
169
|
-
|
170
|
-
/**
|
171
|
-
*
|
172
|
-
* @param
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
*
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
*
|
193
|
-
*/
|
194
|
-
|
195
|
-
/**
|
196
|
-
*
|
197
|
-
* @param
|
198
|
-
* @param
|
199
|
-
* @
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
*
|
208
|
-
* @param
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
*
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
*
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
*
|
225
|
-
* @param
|
226
|
-
* @param
|
227
|
-
* @returns
|
228
|
-
*/
|
229
|
-
static
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
*
|
236
|
-
* @
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
/**
|
245
|
-
*
|
246
|
-
* @param evt
|
247
|
-
* @returns
|
248
|
-
*/
|
249
|
-
|
250
|
-
/**
|
251
|
-
*
|
252
|
-
* @
|
253
|
-
*/
|
254
|
-
|
255
|
-
/**
|
256
|
-
*
|
257
|
-
* @
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
*
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
*
|
269
|
-
*/
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
/**
|
287
|
-
*
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
1
|
+
import { DocumentInput, InputData } from "./document-input-cursor";
|
2
|
+
import { SelectionState } from "./selection/document-selection";
|
3
|
+
import { BlockContainerElement, Element, LeafElement, SelectionContentRange } from "./element-define";
|
4
|
+
import { ParagraphElement, TableElement, TextGroupElement, TrackRunTypeEnum } from "./impl";
|
5
|
+
import { ParagraphNumberType, ParagraphProps, TextProps } from "./element-props";
|
6
|
+
import { ElementReader } from "./element-reader";
|
7
|
+
import { EditorContext } from "./document-context";
|
8
|
+
import { DocumentComment } from "./document-comment";
|
9
|
+
/**
|
10
|
+
* 文档内容改变
|
11
|
+
*/
|
12
|
+
export declare class DocumentChange {
|
13
|
+
private eleReader;
|
14
|
+
private docCtx;
|
15
|
+
private docComment;
|
16
|
+
private documentInput;
|
17
|
+
private selectionState;
|
18
|
+
private viewOptions;
|
19
|
+
constructor(eleReader: ElementReader, docCtx: EditorContext, docComment: DocumentComment, documentInput: DocumentInput);
|
20
|
+
newInput(data: InputData): void;
|
21
|
+
private correctInputEle;
|
22
|
+
/**
|
23
|
+
* 选中区域后进行输入
|
24
|
+
* 需要处理将选中的区域删除后,进行输入的情况
|
25
|
+
*/
|
26
|
+
onInputBySelectRange(data: InputData): void;
|
27
|
+
/**
|
28
|
+
* 当前元素是否在正确的留痕区域(ins-run、del-run),情况分为以下情况
|
29
|
+
* 1.留痕块类型为新增,但是留痕块的创建者为其他用户,此时需要拆分留痕区域
|
30
|
+
* 2.留痕块为当前用户创建,但是创建时间大于有效的时间,此时需要拆分留痕区域
|
31
|
+
* @param startControl
|
32
|
+
* @param trackType
|
33
|
+
* @returns
|
34
|
+
*/
|
35
|
+
isInCorrectTrackRegion(startControl: Element, trackType: TrackRunTypeEnum): boolean;
|
36
|
+
/**
|
37
|
+
* 当前元素是否在留痕区域(ins-run、del-run)中
|
38
|
+
* @param target
|
39
|
+
* @param trackType
|
40
|
+
* @returns
|
41
|
+
*/
|
42
|
+
isInTrackBlock(target: Element, trackType?: TrackRunTypeEnum | null): boolean;
|
43
|
+
/**
|
44
|
+
* 留痕输入
|
45
|
+
* @param data
|
46
|
+
* @param startControl
|
47
|
+
* @param startOffset
|
48
|
+
* @returns
|
49
|
+
*/
|
50
|
+
newInputTrackChanges(data: InputData, startControl: LeafElement, startOffset: number): void;
|
51
|
+
/**
|
52
|
+
* 创建新留痕块,并返回留痕块输入定位文本
|
53
|
+
* @param startControl
|
54
|
+
* @param startOffset
|
55
|
+
* @param trackType
|
56
|
+
* @returns
|
57
|
+
*/
|
58
|
+
createNewTrackInput(startControl: LeafElement, startOffset: number, trackType: TrackRunTypeEnum): TextGroupElement;
|
59
|
+
/**
|
60
|
+
* 获取当前输入节点的文本属性
|
61
|
+
* @param startControl
|
62
|
+
* @param offset
|
63
|
+
* @returns
|
64
|
+
*/
|
65
|
+
getDefaultTextProps(startControl: LeafElement, offset: number): TextProps;
|
66
|
+
/**
|
67
|
+
* 根据选项配置返回创建文本的默认文本属性
|
68
|
+
* @private
|
69
|
+
*/
|
70
|
+
private getDefaultTextPropsByOptions;
|
71
|
+
/**
|
72
|
+
* 当前元素位于留痕区域内,但是当前编辑模式为非留痕模式,需要将当前留痕元素分割开来,插入新普通文本元素对象,并返回
|
73
|
+
* @param startControl
|
74
|
+
* @param startOffset
|
75
|
+
* @returns
|
76
|
+
*/
|
77
|
+
splitTrackElement(startControl: LeafElement, startOffset: number): TextGroupElement;
|
78
|
+
/**
|
79
|
+
* 创建插入(ins-run) 留痕,并且返回留痕的文本元素对象
|
80
|
+
* @param startControl
|
81
|
+
* @returns
|
82
|
+
*/
|
83
|
+
private createTextTrackElement;
|
84
|
+
private createTrackElement;
|
85
|
+
private inputTextGroup;
|
86
|
+
/**
|
87
|
+
* backspace,向前删除
|
88
|
+
*/
|
89
|
+
onBackspace(evt: KeyboardEvent): void;
|
90
|
+
/**
|
91
|
+
* delete,向后删除
|
92
|
+
* @param evt
|
93
|
+
*/
|
94
|
+
onDeleteKeyHandler(evt: KeyboardEvent): void;
|
95
|
+
/**
|
96
|
+
* 根据选择范围删除
|
97
|
+
*/
|
98
|
+
private onRangeDelete;
|
99
|
+
private capturingForSelection;
|
100
|
+
private getSelectionRangeStack;
|
101
|
+
/**
|
102
|
+
* backspace删除
|
103
|
+
* @param control
|
104
|
+
* @param offset
|
105
|
+
* @returns
|
106
|
+
*/
|
107
|
+
private onBackspaceElement;
|
108
|
+
/**
|
109
|
+
* 跳到上一个数据元中
|
110
|
+
* @param currEle
|
111
|
+
*/
|
112
|
+
private jumpToPrevDataElement;
|
113
|
+
/**
|
114
|
+
* delete删除
|
115
|
+
* @param control
|
116
|
+
* @param offset
|
117
|
+
* @returns
|
118
|
+
*/
|
119
|
+
private onKeyDeleteElement;
|
120
|
+
/**
|
121
|
+
* 判断是否可以删除数据组
|
122
|
+
* @param dataEle
|
123
|
+
* @private
|
124
|
+
*/
|
125
|
+
private canDeleteInlineGroup;
|
126
|
+
private onDeleteText;
|
127
|
+
private onDeleteItem;
|
128
|
+
/**
|
129
|
+
* 当前元素是否在留痕元素内
|
130
|
+
* @param target
|
131
|
+
* @param trackType
|
132
|
+
* @returns
|
133
|
+
*/
|
134
|
+
private isInCurrentUserTrack;
|
135
|
+
private isInTrackElement;
|
136
|
+
/**
|
137
|
+
* 留痕除文本以外的其他元素
|
138
|
+
* @param target
|
139
|
+
*/
|
140
|
+
private onTrackDeleteElement;
|
141
|
+
/**
|
142
|
+
* 更新文本删除留痕
|
143
|
+
*/
|
144
|
+
private updateDeletedTrackText;
|
145
|
+
private getNextTrackInputElement;
|
146
|
+
/**
|
147
|
+
* 创建一个待输入的文本元素
|
148
|
+
* @private
|
149
|
+
*/
|
150
|
+
private createNewInputText;
|
151
|
+
private getNextTrackElement;
|
152
|
+
/**
|
153
|
+
* 删除元素并定位光标
|
154
|
+
* @param control
|
155
|
+
* @returns
|
156
|
+
*/
|
157
|
+
private removeElement;
|
158
|
+
/**
|
159
|
+
* 处理在表单模式下光标定位的问题
|
160
|
+
* @param target
|
161
|
+
* @param targetOffset
|
162
|
+
* @param deleteTarget
|
163
|
+
* @private
|
164
|
+
*/
|
165
|
+
private setSelectionStateByDeleteEvent;
|
166
|
+
/**
|
167
|
+
* 回车事件
|
168
|
+
*/
|
169
|
+
onEnter(): void;
|
170
|
+
/**
|
171
|
+
* 插入表格
|
172
|
+
* @param tb
|
173
|
+
* @returns
|
174
|
+
*/
|
175
|
+
insertTable(tb: TableElement): void;
|
176
|
+
/**
|
177
|
+
* 插入布局容器,比如表格、数据容器等
|
178
|
+
* @param ele
|
179
|
+
*/
|
180
|
+
insertLayoutContainer(ele: BlockContainerElement): void;
|
181
|
+
/**
|
182
|
+
* 分割当前段落用于插入表格或者粘贴的内容
|
183
|
+
* @param insertItems 分割后插入的内容,内容需要是block或者表格对象
|
184
|
+
*/
|
185
|
+
private splitCurrentParagraph;
|
186
|
+
/**
|
187
|
+
* 合并段落
|
188
|
+
*/
|
189
|
+
combineParagraph(prevPara: ParagraphElement, currPara: ParagraphElement, currElement: Element): void;
|
190
|
+
/**
|
191
|
+
* 删除选中的区域内容
|
192
|
+
* @param range
|
193
|
+
*/
|
194
|
+
deleteRange(range: SelectionContentRange): void;
|
195
|
+
/**
|
196
|
+
* 表单区域删除处理
|
197
|
+
* @param range
|
198
|
+
* @param startPointElement
|
199
|
+
* @returns
|
200
|
+
*/
|
201
|
+
private deleteRangeInFormEdit;
|
202
|
+
/**
|
203
|
+
* 表单模式:删除选中的区域内容
|
204
|
+
*/
|
205
|
+
private loopForDelDataEleRange;
|
206
|
+
/**
|
207
|
+
* 向目标移动元素
|
208
|
+
* @param targetElement
|
209
|
+
* @param targetOffset
|
210
|
+
* @param moveElement
|
211
|
+
* @param moveOffset
|
212
|
+
* @param ss
|
213
|
+
*/
|
214
|
+
moveElement(targetElement: Element, targetOffset: number, moveElement: Element, moveOffset: number, ss: SelectionState): void;
|
215
|
+
/**
|
216
|
+
* 向指定的目标插入元素
|
217
|
+
* @param targetElement
|
218
|
+
* @param targetOffset
|
219
|
+
* @param destEleArray
|
220
|
+
*/
|
221
|
+
insertElement(targetElement: Element, targetOffset: number, destEleArray: Array<Element>): Element | null;
|
222
|
+
/**
|
223
|
+
* 根据开始位置和结束位置,将字符切割成指定的区间
|
224
|
+
* @param text
|
225
|
+
* @param start
|
226
|
+
* @param end
|
227
|
+
* @returns
|
228
|
+
*/
|
229
|
+
static splitTextGroupByRange(text: TextGroupElement, start: number, end: number): TextGroupElement | null;
|
230
|
+
splitText(text: TextGroupElement, offset: number): {
|
231
|
+
leftElement: TextGroupElement | null;
|
232
|
+
rightElement: TextGroupElement | null;
|
233
|
+
};
|
234
|
+
/**
|
235
|
+
* 设置选中的文本样式
|
236
|
+
* @param ss
|
237
|
+
* @param setterFunc
|
238
|
+
* @returns
|
239
|
+
*/
|
240
|
+
static setTextStyle(ss: SelectionState, setterFunc: (text: TextGroupElement) => void): void;
|
241
|
+
private static recursionSetRangeTextStyle;
|
242
|
+
static setParaAlign(ss: SelectionState, setterFunc: (tp: ParagraphProps) => void): void;
|
243
|
+
static setParaStyle(ss: SelectionState, setterFunc: (tp: ParagraphProps) => void): void;
|
244
|
+
/**
|
245
|
+
* 复制
|
246
|
+
* @param evt
|
247
|
+
* @returns
|
248
|
+
*/
|
249
|
+
onCopy(evt: ClipboardEvent): void;
|
250
|
+
/**
|
251
|
+
* 剪切
|
252
|
+
* @param evt
|
253
|
+
*/
|
254
|
+
onCut(evt: ClipboardEvent): void;
|
255
|
+
/**
|
256
|
+
* 粘贴
|
257
|
+
* @param evt
|
258
|
+
* @returns
|
259
|
+
*/
|
260
|
+
onPaste(evt: ClipboardEvent): void;
|
261
|
+
/**
|
262
|
+
* 处理粘贴的内容
|
263
|
+
* @private
|
264
|
+
*/
|
265
|
+
private handlePasteContent;
|
266
|
+
/**
|
267
|
+
* 复制单元格向另一个单元格粘贴
|
268
|
+
* @private
|
269
|
+
*/
|
270
|
+
private pasteTableToCell;
|
271
|
+
insertSoftBr(): void;
|
272
|
+
insertPageBreakSymbol(): void;
|
273
|
+
/**
|
274
|
+
* 处理黏贴的纯文本
|
275
|
+
* @param text
|
276
|
+
*/
|
277
|
+
private pastePlainText;
|
278
|
+
/**
|
279
|
+
* 向当前光标追加文本
|
280
|
+
* @param appendStr
|
281
|
+
* @param inputOffset
|
282
|
+
* @param replaceLength
|
283
|
+
* @private
|
284
|
+
*/
|
285
|
+
appendText(appendStr: string, replaceText: string): void;
|
286
|
+
/**
|
287
|
+
* 设置当前段落项目符号类型
|
288
|
+
*/
|
289
|
+
setParagraphNumberType(numType?: ParagraphNumberType): void;
|
290
|
+
/**
|
291
|
+
* 插入批注
|
292
|
+
*/
|
293
|
+
insertComment(text: string): void;
|
294
|
+
validate(): boolean;
|
295
|
+
/**
|
296
|
+
* 移除空字符串
|
297
|
+
* @param text
|
298
|
+
*/
|
299
|
+
removeEmptyText(text: TextGroupElement): void;
|
300
|
+
setCursorForDeleteAction(control: Element): void;
|
301
|
+
getCursorElementByDeleteAction(control: Element): {
|
302
|
+
ele: LeafElement;
|
303
|
+
offset: number;
|
304
|
+
} | null;
|
305
|
+
/**
|
306
|
+
* 移除空行内标签
|
307
|
+
* @param ele
|
308
|
+
*/
|
309
|
+
removeEmtpyInlineBlock(ele: Element): void;
|
310
|
+
/**
|
311
|
+
* 插入Tab制表位
|
312
|
+
*/
|
313
|
+
insertTabElement(): void;
|
314
|
+
}
|
@@ -1,24 +1,24 @@
|
|
1
|
-
import { DocumentElement } from "./impl/document/doc-impl";
|
2
|
-
/**
|
3
|
-
* 文档合并
|
4
|
-
*/
|
5
|
-
export declare class DocumentCombine {
|
6
|
-
/**
|
7
|
-
* 合并模板文档
|
8
|
-
* 用于设置合并后,页眉页脚等统一部分
|
9
|
-
*/
|
10
|
-
mainTemplate: DocumentElement;
|
11
|
-
docParts: Array<{
|
12
|
-
doc: DocumentElement;
|
13
|
-
docId: string;
|
14
|
-
}>;
|
15
|
-
/**
|
16
|
-
* 添加需要合并的文档部分
|
17
|
-
*/
|
18
|
-
add(docPart: DocumentElement, id: string): void;
|
19
|
-
dispose(): void;
|
20
|
-
/**
|
21
|
-
* 用于合并文档计算
|
22
|
-
*/
|
23
|
-
load(): DocumentElement;
|
24
|
-
}
|
1
|
+
import { DocumentElement } from "./impl/document/doc-impl";
|
2
|
+
/**
|
3
|
+
* 文档合并
|
4
|
+
*/
|
5
|
+
export declare class DocumentCombine {
|
6
|
+
/**
|
7
|
+
* 合并模板文档
|
8
|
+
* 用于设置合并后,页眉页脚等统一部分
|
9
|
+
*/
|
10
|
+
mainTemplate: DocumentElement;
|
11
|
+
docParts: Array<{
|
12
|
+
doc: DocumentElement;
|
13
|
+
docId: string;
|
14
|
+
}>;
|
15
|
+
/**
|
16
|
+
* 添加需要合并的文档部分
|
17
|
+
*/
|
18
|
+
add(docPart: DocumentElement, id: string): void;
|
19
|
+
dispose(): void;
|
20
|
+
/**
|
21
|
+
* 用于合并文档计算
|
22
|
+
*/
|
23
|
+
load(): DocumentElement;
|
24
|
+
}
|