vue-editify 0.2.15 → 0.2.16
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/examples/App.vue +8 -37
- package/lib/editify/editify.vue.d.ts +0 -1
- package/lib/editify.es.js +17950 -17950
- package/lib/editify.umd.js +2 -2
- package/lib/index.d.ts +163 -164
- package/package.json +2 -2
- package/src/core/rule.ts +12 -22
- package/src/core/tool.ts +3 -3
- package/src/editify/editify.less +2 -0
- package/src/editify/editify.vue +1 -9
- package/src/editify/toolbar/toolbar.less +1 -1
- package/src/feature/align.ts +0 -2
- package/src/feature/attachment.ts +0 -1
- package/src/feature/backColor.ts +0 -2
- package/src/feature/bold.ts +0 -2
- package/src/feature/code.ts +0 -2
- package/src/feature/codeBlock.ts +0 -3
- package/src/feature/fontFamily.ts +0 -2
- package/src/feature/fontSize.ts +0 -2
- package/src/feature/foreColor.ts +0 -2
- package/src/feature/formatClear.ts +0 -2
- package/src/feature/heading.ts +0 -2
- package/src/feature/image.ts +0 -3
- package/src/feature/indent.ts +0 -1
- package/src/feature/infoBlock.ts +0 -1
- package/src/feature/italic.ts +0 -2
- package/src/feature/lineHeight.ts +1 -3
- package/src/feature/link.ts +0 -3
- package/src/feature/mathformula.ts +0 -1
- package/src/feature/orderList.ts +0 -2
- package/src/feature/panel.ts +0 -1
- package/src/feature/quote.ts +0 -1
- package/src/feature/separator.ts +0 -1
- package/src/feature/strikethrough.ts +0 -2
- package/src/feature/sub.ts +0 -2
- package/src/feature/super.ts +0 -2
- package/src/feature/table.ts +0 -13
- package/src/feature/task.ts +0 -2
- package/src/feature/underline.ts +0 -2
- package/src/feature/unorderList.ts +0 -2
- package/src/feature/video.ts +0 -4
- package/src/index.ts +14 -5
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
+
import { AlexElement } from 'alex-editor';
|
|
2
3
|
|
|
3
4
|
declare const Editify: import('./core/tool').SFCWithInstall<import('vue').DefineComponent<{
|
|
4
5
|
locale: {
|
|
@@ -63,7 +64,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
63
64
|
default: null;
|
|
64
65
|
};
|
|
65
66
|
customHtmlPaste: {
|
|
66
|
-
type: import('vue').PropType<(elements:
|
|
67
|
+
type: import('vue').PropType<(elements: AlexElement[]) => void | Promise<void>>;
|
|
67
68
|
default: null;
|
|
68
69
|
};
|
|
69
70
|
customImagePaste: {
|
|
@@ -83,15 +84,15 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
83
84
|
default: null;
|
|
84
85
|
};
|
|
85
86
|
pasteKeepMarks: {
|
|
86
|
-
type: import('vue').PropType<(el:
|
|
87
|
+
type: import('vue').PropType<(el: AlexElement) => import('./core/tool').ObjectType>;
|
|
87
88
|
default: null;
|
|
88
89
|
};
|
|
89
90
|
pasteKeepStyles: {
|
|
90
|
-
type: import('vue').PropType<(el:
|
|
91
|
+
type: import('vue').PropType<(el: AlexElement) => import('./core/tool').ObjectType>;
|
|
91
92
|
default: null;
|
|
92
93
|
};
|
|
93
94
|
customParseNode: {
|
|
94
|
-
type: import('vue').PropType<(el:
|
|
95
|
+
type: import('vue').PropType<(el: AlexElement) => AlexElement>;
|
|
95
96
|
default: null;
|
|
96
97
|
};
|
|
97
98
|
extraKeepTags: {
|
|
@@ -99,7 +100,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
99
100
|
default: () => never[];
|
|
100
101
|
};
|
|
101
102
|
renderRules: {
|
|
102
|
-
type: import('vue').PropType<((el:
|
|
103
|
+
type: import('vue').PropType<((el: AlexElement) => void)[]>;
|
|
103
104
|
default: () => never[];
|
|
104
105
|
};
|
|
105
106
|
autoheight: {
|
|
@@ -127,18 +128,18 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
127
128
|
$el: HTMLElement;
|
|
128
129
|
disabled: boolean;
|
|
129
130
|
value: string;
|
|
130
|
-
renderRules: ((element:
|
|
131
|
+
renderRules: ((element: AlexElement) => void)[];
|
|
131
132
|
allowCopy: boolean;
|
|
132
133
|
allowPaste: boolean;
|
|
133
134
|
allowCut: boolean;
|
|
134
135
|
allowPasteHtml: boolean;
|
|
135
136
|
customTextPaste: ((text: string) => void | Promise<void>) | null;
|
|
136
|
-
customHtmlPaste: ((AlexElements:
|
|
137
|
+
customHtmlPaste: ((AlexElements: AlexElement[], html: string) => void | Promise<void>) | null;
|
|
137
138
|
customImagePaste: ((file: File) => void | Promise<void>) | null;
|
|
138
139
|
customVideoPaste: ((file: File) => void | Promise<void>) | null;
|
|
139
140
|
customFilePaste: ((file: File) => void | Promise<void>) | null;
|
|
140
|
-
customMerge: ((mergeElement:
|
|
141
|
-
customParseNode: ((el:
|
|
141
|
+
customMerge: ((mergeElement: AlexElement, targetElement: AlexElement) => void | Promise<void>) | null;
|
|
142
|
+
customParseNode: ((el: AlexElement) => AlexElement) | null;
|
|
142
143
|
extraKeepTags: string[];
|
|
143
144
|
history: {
|
|
144
145
|
records: {
|
|
@@ -163,27 +164,27 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
163
164
|
isBreak: () => boolean;
|
|
164
165
|
isEmpty: () => boolean;
|
|
165
166
|
isSpaceText: () => boolean;
|
|
166
|
-
getUneditableElement: () =>
|
|
167
|
-
isEqual: (element:
|
|
168
|
-
isContains: (element:
|
|
167
|
+
getUneditableElement: () => AlexElement | null;
|
|
168
|
+
isEqual: (element: AlexElement) => boolean;
|
|
169
|
+
isContains: (element: AlexElement) => boolean;
|
|
169
170
|
isOnlyHasBreak: () => boolean | 0;
|
|
170
171
|
isPreStyle: () => boolean;
|
|
171
172
|
hasMarks: () => boolean;
|
|
172
173
|
hasStyles: () => boolean;
|
|
173
174
|
hasChildren: () => boolean;
|
|
174
|
-
hasContains: (element:
|
|
175
|
-
clone: (deep?: boolean | undefined) =>
|
|
175
|
+
hasContains: (element: AlexElement) => boolean;
|
|
176
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
176
177
|
convertToBlock: () => void;
|
|
177
178
|
toEmpty: () => void;
|
|
178
|
-
getBlock: () =>
|
|
179
|
-
getInblock: () =>
|
|
180
|
-
getInline: () =>
|
|
181
|
-
isEqualStyles: (element:
|
|
182
|
-
isEqualMarks: (element:
|
|
183
|
-
isFirst: (element:
|
|
184
|
-
isLast: (element:
|
|
179
|
+
getBlock: () => AlexElement;
|
|
180
|
+
getInblock: () => AlexElement | null;
|
|
181
|
+
getInline: () => AlexElement | null;
|
|
182
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
183
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
184
|
+
isFirst: (element: AlexElement) => boolean;
|
|
185
|
+
isLast: (element: AlexElement) => boolean;
|
|
185
186
|
__render: () => void;
|
|
186
|
-
__fullClone: () =>
|
|
187
|
+
__fullClone: () => AlexElement;
|
|
187
188
|
}[];
|
|
188
189
|
range: {
|
|
189
190
|
anchor: {
|
|
@@ -208,32 +209,32 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
208
209
|
isBreak: () => boolean;
|
|
209
210
|
isEmpty: () => boolean;
|
|
210
211
|
isSpaceText: () => boolean;
|
|
211
|
-
getUneditableElement: () =>
|
|
212
|
-
isEqual: (element:
|
|
213
|
-
isContains: (element:
|
|
212
|
+
getUneditableElement: () => AlexElement | null;
|
|
213
|
+
isEqual: (element: AlexElement) => boolean;
|
|
214
|
+
isContains: (element: AlexElement) => boolean;
|
|
214
215
|
isOnlyHasBreak: () => boolean | 0;
|
|
215
216
|
isPreStyle: () => boolean;
|
|
216
217
|
hasMarks: () => boolean;
|
|
217
218
|
hasStyles: () => boolean;
|
|
218
219
|
hasChildren: () => boolean;
|
|
219
|
-
hasContains: (element:
|
|
220
|
-
clone: (deep?: boolean | undefined) =>
|
|
220
|
+
hasContains: (element: AlexElement) => boolean;
|
|
221
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
221
222
|
convertToBlock: () => void;
|
|
222
223
|
toEmpty: () => void;
|
|
223
|
-
getBlock: () =>
|
|
224
|
-
getInblock: () =>
|
|
225
|
-
getInline: () =>
|
|
226
|
-
isEqualStyles: (element:
|
|
227
|
-
isEqualMarks: (element:
|
|
228
|
-
isFirst: (element:
|
|
229
|
-
isLast: (element:
|
|
224
|
+
getBlock: () => AlexElement;
|
|
225
|
+
getInblock: () => AlexElement | null;
|
|
226
|
+
getInline: () => AlexElement | null;
|
|
227
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
228
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
229
|
+
isFirst: (element: AlexElement) => boolean;
|
|
230
|
+
isLast: (element: AlexElement) => boolean;
|
|
230
231
|
__render: () => void;
|
|
231
|
-
__fullClone: () =>
|
|
232
|
+
__fullClone: () => AlexElement;
|
|
232
233
|
};
|
|
233
234
|
offset: number;
|
|
234
235
|
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
|
235
|
-
moveToEnd: (element:
|
|
236
|
-
moveToStart: (element:
|
|
236
|
+
moveToEnd: (element: AlexElement) => void;
|
|
237
|
+
moveToStart: (element: AlexElement) => void;
|
|
237
238
|
};
|
|
238
239
|
focus: {
|
|
239
240
|
element: {
|
|
@@ -257,40 +258,40 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
257
258
|
isBreak: () => boolean;
|
|
258
259
|
isEmpty: () => boolean;
|
|
259
260
|
isSpaceText: () => boolean;
|
|
260
|
-
getUneditableElement: () =>
|
|
261
|
-
isEqual: (element:
|
|
262
|
-
isContains: (element:
|
|
261
|
+
getUneditableElement: () => AlexElement | null;
|
|
262
|
+
isEqual: (element: AlexElement) => boolean;
|
|
263
|
+
isContains: (element: AlexElement) => boolean;
|
|
263
264
|
isOnlyHasBreak: () => boolean | 0;
|
|
264
265
|
isPreStyle: () => boolean;
|
|
265
266
|
hasMarks: () => boolean;
|
|
266
267
|
hasStyles: () => boolean;
|
|
267
268
|
hasChildren: () => boolean;
|
|
268
|
-
hasContains: (element:
|
|
269
|
-
clone: (deep?: boolean | undefined) =>
|
|
269
|
+
hasContains: (element: AlexElement) => boolean;
|
|
270
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
270
271
|
convertToBlock: () => void;
|
|
271
272
|
toEmpty: () => void;
|
|
272
|
-
getBlock: () =>
|
|
273
|
-
getInblock: () =>
|
|
274
|
-
getInline: () =>
|
|
275
|
-
isEqualStyles: (element:
|
|
276
|
-
isEqualMarks: (element:
|
|
277
|
-
isFirst: (element:
|
|
278
|
-
isLast: (element:
|
|
273
|
+
getBlock: () => AlexElement;
|
|
274
|
+
getInblock: () => AlexElement | null;
|
|
275
|
+
getInline: () => AlexElement | null;
|
|
276
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
277
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
278
|
+
isFirst: (element: AlexElement) => boolean;
|
|
279
|
+
isLast: (element: AlexElement) => boolean;
|
|
279
280
|
__render: () => void;
|
|
280
|
-
__fullClone: () =>
|
|
281
|
+
__fullClone: () => AlexElement;
|
|
281
282
|
};
|
|
282
283
|
offset: number;
|
|
283
284
|
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
|
284
|
-
moveToEnd: (element:
|
|
285
|
-
moveToStart: (element:
|
|
285
|
+
moveToEnd: (element: AlexElement) => void;
|
|
286
|
+
moveToStart: (element: AlexElement) => void;
|
|
286
287
|
};
|
|
287
288
|
} | null;
|
|
288
289
|
}[];
|
|
289
290
|
current: number;
|
|
290
|
-
push: (stack:
|
|
291
|
+
push: (stack: AlexElement[], range?: import('alex-editor').AlexRange | null) => void;
|
|
291
292
|
get: (type: -1 | 1) => import('alex-editor').AlexHistoryResultType | null;
|
|
292
293
|
updateCurrentRange: (range: import('alex-editor').AlexRange) => void;
|
|
293
|
-
__cloneRange: (newStack:
|
|
294
|
+
__cloneRange: (newStack: AlexElement[], range?: import('alex-editor').AlexRange | null) => import('alex-editor').AlexRange | null;
|
|
294
295
|
};
|
|
295
296
|
stack: {
|
|
296
297
|
key: number;
|
|
@@ -313,27 +314,27 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
313
314
|
isBreak: () => boolean;
|
|
314
315
|
isEmpty: () => boolean;
|
|
315
316
|
isSpaceText: () => boolean;
|
|
316
|
-
getUneditableElement: () =>
|
|
317
|
-
isEqual: (element:
|
|
318
|
-
isContains: (element:
|
|
317
|
+
getUneditableElement: () => AlexElement | null;
|
|
318
|
+
isEqual: (element: AlexElement) => boolean;
|
|
319
|
+
isContains: (element: AlexElement) => boolean;
|
|
319
320
|
isOnlyHasBreak: () => boolean | 0;
|
|
320
321
|
isPreStyle: () => boolean;
|
|
321
322
|
hasMarks: () => boolean;
|
|
322
323
|
hasStyles: () => boolean;
|
|
323
324
|
hasChildren: () => boolean;
|
|
324
|
-
hasContains: (element:
|
|
325
|
-
clone: (deep?: boolean | undefined) =>
|
|
325
|
+
hasContains: (element: AlexElement) => boolean;
|
|
326
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
326
327
|
convertToBlock: () => void;
|
|
327
328
|
toEmpty: () => void;
|
|
328
|
-
getBlock: () =>
|
|
329
|
-
getInblock: () =>
|
|
330
|
-
getInline: () =>
|
|
331
|
-
isEqualStyles: (element:
|
|
332
|
-
isEqualMarks: (element:
|
|
333
|
-
isFirst: (element:
|
|
334
|
-
isLast: (element:
|
|
329
|
+
getBlock: () => AlexElement;
|
|
330
|
+
getInblock: () => AlexElement | null;
|
|
331
|
+
getInline: () => AlexElement | null;
|
|
332
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
333
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
334
|
+
isFirst: (element: AlexElement) => boolean;
|
|
335
|
+
isLast: (element: AlexElement) => boolean;
|
|
335
336
|
__render: () => void;
|
|
336
|
-
__fullClone: () =>
|
|
337
|
+
__fullClone: () => AlexElement;
|
|
337
338
|
}[];
|
|
338
339
|
range: {
|
|
339
340
|
anchor: {
|
|
@@ -358,32 +359,32 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
358
359
|
isBreak: () => boolean;
|
|
359
360
|
isEmpty: () => boolean;
|
|
360
361
|
isSpaceText: () => boolean;
|
|
361
|
-
getUneditableElement: () =>
|
|
362
|
-
isEqual: (element:
|
|
363
|
-
isContains: (element:
|
|
362
|
+
getUneditableElement: () => AlexElement | null;
|
|
363
|
+
isEqual: (element: AlexElement) => boolean;
|
|
364
|
+
isContains: (element: AlexElement) => boolean;
|
|
364
365
|
isOnlyHasBreak: () => boolean | 0;
|
|
365
366
|
isPreStyle: () => boolean;
|
|
366
367
|
hasMarks: () => boolean;
|
|
367
368
|
hasStyles: () => boolean;
|
|
368
369
|
hasChildren: () => boolean;
|
|
369
|
-
hasContains: (element:
|
|
370
|
-
clone: (deep?: boolean | undefined) =>
|
|
370
|
+
hasContains: (element: AlexElement) => boolean;
|
|
371
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
371
372
|
convertToBlock: () => void;
|
|
372
373
|
toEmpty: () => void;
|
|
373
|
-
getBlock: () =>
|
|
374
|
-
getInblock: () =>
|
|
375
|
-
getInline: () =>
|
|
376
|
-
isEqualStyles: (element:
|
|
377
|
-
isEqualMarks: (element:
|
|
378
|
-
isFirst: (element:
|
|
379
|
-
isLast: (element:
|
|
374
|
+
getBlock: () => AlexElement;
|
|
375
|
+
getInblock: () => AlexElement | null;
|
|
376
|
+
getInline: () => AlexElement | null;
|
|
377
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
378
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
379
|
+
isFirst: (element: AlexElement) => boolean;
|
|
380
|
+
isLast: (element: AlexElement) => boolean;
|
|
380
381
|
__render: () => void;
|
|
381
|
-
__fullClone: () =>
|
|
382
|
+
__fullClone: () => AlexElement;
|
|
382
383
|
};
|
|
383
384
|
offset: number;
|
|
384
385
|
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
|
385
|
-
moveToEnd: (element:
|
|
386
|
-
moveToStart: (element:
|
|
386
|
+
moveToEnd: (element: AlexElement) => void;
|
|
387
|
+
moveToStart: (element: AlexElement) => void;
|
|
387
388
|
};
|
|
388
389
|
focus: {
|
|
389
390
|
element: {
|
|
@@ -407,32 +408,32 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
407
408
|
isBreak: () => boolean;
|
|
408
409
|
isEmpty: () => boolean;
|
|
409
410
|
isSpaceText: () => boolean;
|
|
410
|
-
getUneditableElement: () =>
|
|
411
|
-
isEqual: (element:
|
|
412
|
-
isContains: (element:
|
|
411
|
+
getUneditableElement: () => AlexElement | null;
|
|
412
|
+
isEqual: (element: AlexElement) => boolean;
|
|
413
|
+
isContains: (element: AlexElement) => boolean;
|
|
413
414
|
isOnlyHasBreak: () => boolean | 0;
|
|
414
415
|
isPreStyle: () => boolean;
|
|
415
416
|
hasMarks: () => boolean;
|
|
416
417
|
hasStyles: () => boolean;
|
|
417
418
|
hasChildren: () => boolean;
|
|
418
|
-
hasContains: (element:
|
|
419
|
-
clone: (deep?: boolean | undefined) =>
|
|
419
|
+
hasContains: (element: AlexElement) => boolean;
|
|
420
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
420
421
|
convertToBlock: () => void;
|
|
421
422
|
toEmpty: () => void;
|
|
422
|
-
getBlock: () =>
|
|
423
|
-
getInblock: () =>
|
|
424
|
-
getInline: () =>
|
|
425
|
-
isEqualStyles: (element:
|
|
426
|
-
isEqualMarks: (element:
|
|
427
|
-
isFirst: (element:
|
|
428
|
-
isLast: (element:
|
|
423
|
+
getBlock: () => AlexElement;
|
|
424
|
+
getInblock: () => AlexElement | null;
|
|
425
|
+
getInline: () => AlexElement | null;
|
|
426
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
427
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
428
|
+
isFirst: (element: AlexElement) => boolean;
|
|
429
|
+
isLast: (element: AlexElement) => boolean;
|
|
429
430
|
__render: () => void;
|
|
430
|
-
__fullClone: () =>
|
|
431
|
+
__fullClone: () => AlexElement;
|
|
431
432
|
};
|
|
432
433
|
offset: number;
|
|
433
434
|
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
|
434
|
-
moveToEnd: (element:
|
|
435
|
-
moveToStart: (element:
|
|
435
|
+
moveToEnd: (element: AlexElement) => void;
|
|
436
|
+
moveToStart: (element: AlexElement) => void;
|
|
436
437
|
};
|
|
437
438
|
} | null;
|
|
438
439
|
__guid: number;
|
|
@@ -458,27 +459,27 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
458
459
|
isBreak: () => boolean;
|
|
459
460
|
isEmpty: () => boolean;
|
|
460
461
|
isSpaceText: () => boolean;
|
|
461
|
-
getUneditableElement: () =>
|
|
462
|
-
isEqual: (element:
|
|
463
|
-
isContains: (element:
|
|
462
|
+
getUneditableElement: () => AlexElement | null;
|
|
463
|
+
isEqual: (element: AlexElement) => boolean;
|
|
464
|
+
isContains: (element: AlexElement) => boolean;
|
|
464
465
|
isOnlyHasBreak: () => boolean | 0;
|
|
465
466
|
isPreStyle: () => boolean;
|
|
466
467
|
hasMarks: () => boolean;
|
|
467
468
|
hasStyles: () => boolean;
|
|
468
469
|
hasChildren: () => boolean;
|
|
469
|
-
hasContains: (element:
|
|
470
|
-
clone: (deep?: boolean | undefined) =>
|
|
470
|
+
hasContains: (element: AlexElement) => boolean;
|
|
471
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
471
472
|
convertToBlock: () => void;
|
|
472
473
|
toEmpty: () => void;
|
|
473
|
-
getBlock: () =>
|
|
474
|
-
getInblock: () =>
|
|
475
|
-
getInline: () =>
|
|
476
|
-
isEqualStyles: (element:
|
|
477
|
-
isEqualMarks: (element:
|
|
478
|
-
isFirst: (element:
|
|
479
|
-
isLast: (element:
|
|
474
|
+
getBlock: () => AlexElement;
|
|
475
|
+
getInblock: () => AlexElement | null;
|
|
476
|
+
getInline: () => AlexElement | null;
|
|
477
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
478
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
479
|
+
isFirst: (element: AlexElement) => boolean;
|
|
480
|
+
isLast: (element: AlexElement) => boolean;
|
|
480
481
|
__render: () => void;
|
|
481
|
-
__fullClone: () =>
|
|
482
|
+
__fullClone: () => AlexElement;
|
|
482
483
|
}[];
|
|
483
484
|
__isInputChinese: boolean;
|
|
484
485
|
__innerSelectionChange: boolean;
|
|
@@ -487,24 +488,23 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
487
488
|
delete: () => void;
|
|
488
489
|
insertText: (data: string) => void;
|
|
489
490
|
insertParagraph: () => void;
|
|
490
|
-
insertElement: (ele:
|
|
491
|
-
formatElementStack: () => void;
|
|
491
|
+
insertElement: (ele: AlexElement, cover?: boolean | undefined) => void;
|
|
492
492
|
domRender: (unPushHistory?: boolean | undefined) => void;
|
|
493
493
|
rangeRender: () => Promise<void>;
|
|
494
|
-
parseHtml: (html: string) =>
|
|
495
|
-
parseNode: (node: HTMLElement) =>
|
|
496
|
-
merge: (ele:
|
|
497
|
-
getElementByKey: (key: number) =>
|
|
498
|
-
getPreviousElement: (ele:
|
|
499
|
-
getNextElement: (ele:
|
|
500
|
-
getPreviousElementOfPoint: (point: import('alex-editor').AlexPoint) =>
|
|
501
|
-
getNextElementOfPoint: (point: import('alex-editor').AlexPoint) =>
|
|
494
|
+
parseHtml: (html: string) => AlexElement[];
|
|
495
|
+
parseNode: (node: HTMLElement) => AlexElement;
|
|
496
|
+
merge: (ele: AlexElement, previousEle: AlexElement) => void;
|
|
497
|
+
getElementByKey: (key: number) => AlexElement | null;
|
|
498
|
+
getPreviousElement: (ele: AlexElement) => AlexElement | null;
|
|
499
|
+
getNextElement: (ele: AlexElement) => AlexElement | null;
|
|
500
|
+
getPreviousElementOfPoint: (point: import('alex-editor').AlexPoint) => AlexElement | null;
|
|
501
|
+
getNextElementOfPoint: (point: import('alex-editor').AlexPoint) => AlexElement | null;
|
|
502
502
|
getElementsByRange: () => import('alex-editor').AlexElementsRangeType;
|
|
503
|
-
addElementTo: (childEle:
|
|
504
|
-
addElementBefore: (newEle:
|
|
505
|
-
addElementAfter: (newEle:
|
|
506
|
-
collapseToStart: (element?:
|
|
507
|
-
collapseToEnd: (element?:
|
|
503
|
+
addElementTo: (childEle: AlexElement, parentEle: AlexElement, index?: number | undefined) => void;
|
|
504
|
+
addElementBefore: (newEle: AlexElement, targetEle: AlexElement) => void;
|
|
505
|
+
addElementAfter: (newEle: AlexElement, targetEle: AlexElement) => void;
|
|
506
|
+
collapseToStart: (element?: AlexElement) => void;
|
|
507
|
+
collapseToEnd: (element?: AlexElement) => void;
|
|
508
508
|
setDisabled: () => void;
|
|
509
509
|
setEnabled: () => void;
|
|
510
510
|
emit: (eventName: string, ...value: any) => boolean;
|
|
@@ -537,27 +537,27 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
537
537
|
isBreak: () => boolean;
|
|
538
538
|
isEmpty: () => boolean;
|
|
539
539
|
isSpaceText: () => boolean;
|
|
540
|
-
getUneditableElement: () =>
|
|
541
|
-
isEqual: (element:
|
|
542
|
-
isContains: (element:
|
|
540
|
+
getUneditableElement: () => AlexElement | null;
|
|
541
|
+
isEqual: (element: AlexElement) => boolean;
|
|
542
|
+
isContains: (element: AlexElement) => boolean;
|
|
543
543
|
isOnlyHasBreak: () => boolean | 0;
|
|
544
544
|
isPreStyle: () => boolean;
|
|
545
545
|
hasMarks: () => boolean;
|
|
546
546
|
hasStyles: () => boolean;
|
|
547
547
|
hasChildren: () => boolean;
|
|
548
|
-
hasContains: (element:
|
|
549
|
-
clone: (deep?: boolean | undefined) =>
|
|
548
|
+
hasContains: (element: AlexElement) => boolean;
|
|
549
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
550
550
|
convertToBlock: () => void;
|
|
551
551
|
toEmpty: () => void;
|
|
552
|
-
getBlock: () =>
|
|
553
|
-
getInblock: () =>
|
|
554
|
-
getInline: () =>
|
|
555
|
-
isEqualStyles: (element:
|
|
556
|
-
isEqualMarks: (element:
|
|
557
|
-
isFirst: (element:
|
|
558
|
-
isLast: (element:
|
|
552
|
+
getBlock: () => AlexElement;
|
|
553
|
+
getInblock: () => AlexElement | null;
|
|
554
|
+
getInline: () => AlexElement | null;
|
|
555
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
556
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
557
|
+
isFirst: (element: AlexElement) => boolean;
|
|
558
|
+
isLast: (element: AlexElement) => boolean;
|
|
559
559
|
__render: () => void;
|
|
560
|
-
__fullClone: () =>
|
|
560
|
+
__fullClone: () => AlexElement;
|
|
561
561
|
};
|
|
562
562
|
offset: number[] | false;
|
|
563
563
|
}[];
|
|
@@ -583,27 +583,27 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
583
583
|
isBreak: () => boolean;
|
|
584
584
|
isEmpty: () => boolean;
|
|
585
585
|
isSpaceText: () => boolean;
|
|
586
|
-
getUneditableElement: () =>
|
|
587
|
-
isEqual: (element:
|
|
588
|
-
isContains: (element:
|
|
586
|
+
getUneditableElement: () => AlexElement | null;
|
|
587
|
+
isEqual: (element: AlexElement) => boolean;
|
|
588
|
+
isContains: (element: AlexElement) => boolean;
|
|
589
589
|
isOnlyHasBreak: () => boolean | 0;
|
|
590
590
|
isPreStyle: () => boolean;
|
|
591
591
|
hasMarks: () => boolean;
|
|
592
592
|
hasStyles: () => boolean;
|
|
593
593
|
hasChildren: () => boolean;
|
|
594
|
-
hasContains: (element:
|
|
595
|
-
clone: (deep?: boolean | undefined) =>
|
|
594
|
+
hasContains: (element: AlexElement) => boolean;
|
|
595
|
+
clone: (deep?: boolean | undefined) => AlexElement;
|
|
596
596
|
convertToBlock: () => void;
|
|
597
597
|
toEmpty: () => void;
|
|
598
|
-
getBlock: () =>
|
|
599
|
-
getInblock: () =>
|
|
600
|
-
getInline: () =>
|
|
601
|
-
isEqualStyles: (element:
|
|
602
|
-
isEqualMarks: (element:
|
|
603
|
-
isFirst: (element:
|
|
604
|
-
isLast: (element:
|
|
598
|
+
getBlock: () => AlexElement;
|
|
599
|
+
getInblock: () => AlexElement | null;
|
|
600
|
+
getInline: () => AlexElement | null;
|
|
601
|
+
isEqualStyles: (element: AlexElement) => boolean;
|
|
602
|
+
isEqualMarks: (element: AlexElement) => boolean;
|
|
603
|
+
isFirst: (element: AlexElement) => boolean;
|
|
604
|
+
isLast: (element: AlexElement) => boolean;
|
|
605
605
|
__render: () => void;
|
|
606
|
-
__fullClone: () =>
|
|
606
|
+
__fullClone: () => AlexElement;
|
|
607
607
|
};
|
|
608
608
|
offset: number[] | false;
|
|
609
609
|
}[];
|
|
@@ -687,7 +687,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
687
687
|
default: null;
|
|
688
688
|
};
|
|
689
689
|
customHtmlPaste: {
|
|
690
|
-
type: import('vue').PropType<(elements:
|
|
690
|
+
type: import('vue').PropType<(elements: AlexElement[]) => void | Promise<void>>;
|
|
691
691
|
default: null;
|
|
692
692
|
};
|
|
693
693
|
customImagePaste: {
|
|
@@ -707,15 +707,15 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
707
707
|
default: null;
|
|
708
708
|
};
|
|
709
709
|
pasteKeepMarks: {
|
|
710
|
-
type: import('vue').PropType<(el:
|
|
710
|
+
type: import('vue').PropType<(el: AlexElement) => import('./core/tool').ObjectType>;
|
|
711
711
|
default: null;
|
|
712
712
|
};
|
|
713
713
|
pasteKeepStyles: {
|
|
714
|
-
type: import('vue').PropType<(el:
|
|
714
|
+
type: import('vue').PropType<(el: AlexElement) => import('./core/tool').ObjectType>;
|
|
715
715
|
default: null;
|
|
716
716
|
};
|
|
717
717
|
customParseNode: {
|
|
718
|
-
type: import('vue').PropType<(el:
|
|
718
|
+
type: import('vue').PropType<(el: AlexElement) => AlexElement>;
|
|
719
719
|
default: null;
|
|
720
720
|
};
|
|
721
721
|
extraKeepTags: {
|
|
@@ -723,7 +723,7 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
723
723
|
default: () => never[];
|
|
724
724
|
};
|
|
725
725
|
renderRules: {
|
|
726
|
-
type: import('vue').PropType<((el:
|
|
726
|
+
type: import('vue').PropType<((el: AlexElement) => void)[]>;
|
|
727
727
|
default: () => never[];
|
|
728
728
|
};
|
|
729
729
|
autoheight: {
|
|
@@ -774,15 +774,15 @@ declare const Editify: import('./core/tool').SFCWithInstall<import('vue').Define
|
|
|
774
774
|
videoRatio: number;
|
|
775
775
|
showWordLength: boolean;
|
|
776
776
|
customTextPaste: (data: string) => void | Promise<void>;
|
|
777
|
-
customHtmlPaste: (elements:
|
|
777
|
+
customHtmlPaste: (elements: AlexElement[]) => void | Promise<void>;
|
|
778
778
|
customImagePaste: (file: File) => void | Promise<void>;
|
|
779
779
|
customVideoPaste: (file: File) => void | Promise<void>;
|
|
780
780
|
customFilePaste: (file: File) => void | Promise<void>;
|
|
781
|
-
pasteKeepMarks: (el:
|
|
782
|
-
pasteKeepStyles: (el:
|
|
783
|
-
customParseNode: (el:
|
|
781
|
+
pasteKeepMarks: (el: AlexElement) => import('./core/tool').ObjectType;
|
|
782
|
+
pasteKeepStyles: (el: AlexElement) => import('./core/tool').ObjectType;
|
|
783
|
+
customParseNode: (el: AlexElement) => AlexElement;
|
|
784
784
|
extraKeepTags: string[];
|
|
785
|
-
renderRules: ((el:
|
|
785
|
+
renderRules: ((el: AlexElement) => void)[];
|
|
786
786
|
autoheight: boolean;
|
|
787
787
|
tab: boolean;
|
|
788
788
|
dark: boolean;
|
|
@@ -806,6 +806,5 @@ export type * from './editify/menu';
|
|
|
806
806
|
export type * from './editify/toolbar';
|
|
807
807
|
export { elementIsMatch, getMatchElementByElement, getMatchElementByRange, elementIsList, getListByElement, hasListInRange, rangeIsInList, elementIsTask, getTaskByElement, hasTaskInRange, rangeIsInTask, elementIsAttachment, hasAttachmentInRange, elementIsMathformula, getMathformulaByElement, hasMathformulaInRange, elementIsPanel, getPanelByElement, hasPanelInRange, elementIsInfoBlock, getInfoBlockByElement, hasInfoBlockInRange, rangeIsInInfoBlock, hasPreInRange, hasQuoteInRange, hasLinkInRange, hasTableInRange, hasImageInRange, hasVideoInRange, rangeIsInQuote, queryTextStyle, queryTextMark, getRangeText, setIndentIncrease, setIndentDecrease, setQuote, setAlign, setList, setTask, setTextStyle, setTextMark, removeTextStyle, removeTextMark, setLineHeight, insertLink, insertImage, insertVideo, insertTable, insertCodeBlock, insertSeparator } from './core/function';
|
|
808
808
|
declare const install: (app: App) => void;
|
|
809
|
-
declare const version = "0.2.
|
|
810
|
-
export { AlexElement }
|
|
811
|
-
export { Editify as default, Editify, install, version };
|
|
809
|
+
declare const version = "0.2.16";
|
|
810
|
+
export { Editify as default, Editify, install, AlexElement, version };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-editify",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"lib": "vue-tsc && vite build"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"alex-editor": "^1.4.
|
|
20
|
+
"alex-editor": "^1.4.24",
|
|
21
21
|
"dap-util": "^1.5.8",
|
|
22
22
|
"highlight.js": "^11.8.0",
|
|
23
23
|
"katex": "^0.16.10",
|