vue-editify 0.1.49 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/tool.d.ts +10 -1
- package/lib/editify/props.d.ts +1 -1
- package/lib/editify.es.js +12794 -12786
- package/lib/editify.umd.js +2 -1
- package/lib/index.d.ts +731 -5
- package/lib/plugins/infoBlock/index.d.ts +1 -1
- package/lib/plugins/mathformula/index.d.ts +1 -1
- package/lib/plugins/panel/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/button/button.vue +5 -5
- package/src/components/button/props.ts +1 -1
- package/src/components/checkbox/checkbox.vue +3 -3
- package/src/components/checkbox/props.ts +1 -1
- package/src/components/colors/colors.vue +3 -3
- package/src/components/colors/props.ts +1 -1
- package/src/components/insertImage/insertImage.vue +3 -3
- package/src/components/insertLink/insertLink.vue +1 -1
- package/src/components/insertVideo/insertVideo.vue +3 -3
- package/src/components/layer/layer.vue +3 -3
- package/src/components/menu/menu.vue +13 -13
- package/src/components/menu/props.ts +1 -1
- package/src/components/toolbar/props.ts +1 -1
- package/src/components/toolbar/toolbar.vue +10 -10
- package/src/components/tooltip/tooltip.vue +1 -1
- package/src/components/triangle/triangle.vue +1 -1
- package/src/core/function.ts +2 -2
- package/src/core/rule.ts +4 -4
- package/src/core/tool.ts +20 -6
- package/src/editify/editify.vue +8 -8
- package/src/editify/props.ts +2 -2
- package/src/index.ts +24 -21
- package/src/plugins/attachment/index.ts +7 -7
- package/src/plugins/attachment/insertAttachment/insertAttachment.vue +3 -3
- package/src/plugins/infoBlock/index.ts +4 -4
- package/src/plugins/mathformula/index.ts +4 -4
- package/src/plugins/panel/index.ts +4 -4
- package/tsconfig.json +4 -0
- package/vite.config.ts +7 -1
- package/lib/style.css +0 -1
package/lib/index.d.ts
CHANGED
@@ -1,14 +1,740 @@
|
|
1
|
-
import {
|
2
|
-
import { default as Editify } from './editify/editify.vue';
|
1
|
+
import { App } from 'vue';
|
3
2
|
|
3
|
+
declare const Editify: import('./core/tool').SFCWithInstall<import('vue').DefineComponent<{
|
4
|
+
locale: {
|
5
|
+
type: import('vue').PropType<import('./locale').LocaleType>;
|
6
|
+
default: string;
|
7
|
+
};
|
8
|
+
modelValue: {
|
9
|
+
type: StringConstructor;
|
10
|
+
default: string;
|
11
|
+
};
|
12
|
+
placeholder: {
|
13
|
+
type: StringConstructor;
|
14
|
+
default: string;
|
15
|
+
};
|
16
|
+
autofocus: {
|
17
|
+
type: BooleanConstructor;
|
18
|
+
default: boolean;
|
19
|
+
};
|
20
|
+
disabled: {
|
21
|
+
type: BooleanConstructor;
|
22
|
+
default: boolean;
|
23
|
+
};
|
24
|
+
allowCopy: {
|
25
|
+
type: BooleanConstructor;
|
26
|
+
default: boolean;
|
27
|
+
};
|
28
|
+
allowPaste: {
|
29
|
+
type: BooleanConstructor;
|
30
|
+
default: boolean;
|
31
|
+
};
|
32
|
+
allowCut: {
|
33
|
+
type: BooleanConstructor;
|
34
|
+
default: boolean;
|
35
|
+
};
|
36
|
+
allowPasteHtml: {
|
37
|
+
type: BooleanConstructor;
|
38
|
+
default: boolean;
|
39
|
+
};
|
40
|
+
border: {
|
41
|
+
type: BooleanConstructor;
|
42
|
+
default: boolean;
|
43
|
+
};
|
44
|
+
color: {
|
45
|
+
type: import('vue').PropType<string | null>;
|
46
|
+
default: string;
|
47
|
+
validator(value: any): boolean;
|
48
|
+
};
|
49
|
+
videoRatio: {
|
50
|
+
type: NumberConstructor;
|
51
|
+
default: number;
|
52
|
+
};
|
53
|
+
toolbar: {
|
54
|
+
type: import('vue').PropType<import('./core/tool').ToolbarConfigType>;
|
55
|
+
default: null;
|
56
|
+
};
|
57
|
+
showWordLength: {
|
58
|
+
type: BooleanConstructor;
|
59
|
+
default: boolean;
|
60
|
+
};
|
61
|
+
customTextPaste: {
|
62
|
+
type: import('vue').PropType<(data: string) => void | Promise<void>>;
|
63
|
+
default: null;
|
64
|
+
};
|
65
|
+
customHtmlPaste: {
|
66
|
+
type: import('vue').PropType<(elements: import('alex-editor').AlexElement[]) => void | Promise<void>>;
|
67
|
+
default: null;
|
68
|
+
};
|
69
|
+
customImagePaste: {
|
70
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
71
|
+
default: null;
|
72
|
+
};
|
73
|
+
customVideoPaste: {
|
74
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
75
|
+
default: null;
|
76
|
+
};
|
77
|
+
customFilePaste: {
|
78
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
79
|
+
default: null;
|
80
|
+
};
|
81
|
+
menu: {
|
82
|
+
type: import('vue').PropType<import('./core/tool').MenuConfigType>;
|
83
|
+
default: null;
|
84
|
+
};
|
85
|
+
pasteKeepMarks: {
|
86
|
+
type: import('vue').PropType<(el: import('alex-editor').AlexElement) => import('./core/tool').ObjectType>;
|
87
|
+
default: null;
|
88
|
+
};
|
89
|
+
pasteKeepStyles: {
|
90
|
+
type: import('vue').PropType<(el: import('alex-editor').AlexElement) => import('./core/tool').ObjectType>;
|
91
|
+
default: null;
|
92
|
+
};
|
93
|
+
customParseNode: {
|
94
|
+
type: import('vue').PropType<(el: import('alex-editor').AlexElement) => import('alex-editor').AlexElement>;
|
95
|
+
default: null;
|
96
|
+
};
|
97
|
+
extraKeepTags: {
|
98
|
+
type: import('vue').PropType<string[]>;
|
99
|
+
default: () => never[];
|
100
|
+
};
|
101
|
+
renderRules: {
|
102
|
+
type: import('vue').PropType<((el: import('alex-editor').AlexElement) => void)[]>;
|
103
|
+
default: () => never[];
|
104
|
+
};
|
105
|
+
autoheight: {
|
106
|
+
type: BooleanConstructor;
|
107
|
+
default: boolean;
|
108
|
+
};
|
109
|
+
tab: {
|
110
|
+
type: BooleanConstructor;
|
111
|
+
default: boolean;
|
112
|
+
};
|
113
|
+
plugins: {
|
114
|
+
type: import('vue').PropType<import('./core/tool').PluginType[]>;
|
115
|
+
default: () => never[];
|
116
|
+
};
|
117
|
+
}, {
|
118
|
+
editor: import('vue').Ref<{
|
119
|
+
$el: HTMLElement;
|
120
|
+
disabled: boolean;
|
121
|
+
value: string;
|
122
|
+
renderRules: ((element: import('alex-editor').AlexElement) => void)[];
|
123
|
+
allowCopy: boolean;
|
124
|
+
allowPaste: boolean;
|
125
|
+
allowCut: boolean;
|
126
|
+
allowPasteHtml: boolean;
|
127
|
+
customTextPaste: ((text: string) => void | Promise<void>) | null;
|
128
|
+
customHtmlPaste: ((AlexElements: import('alex-editor').AlexElement[], html: string) => void | Promise<void>) | null;
|
129
|
+
customImagePaste: ((file: File) => void | Promise<void>) | null;
|
130
|
+
customVideoPaste: ((file: File) => void | Promise<void>) | null;
|
131
|
+
customFilePaste: ((file: File) => void | Promise<void>) | null;
|
132
|
+
customMerge: ((mergeElement: import('alex-editor').AlexElement, targetElement: import('alex-editor').AlexElement) => void | Promise<void>) | null;
|
133
|
+
customParseNode: ((el: import('alex-editor').AlexElement) => import('alex-editor').AlexElement) | null;
|
134
|
+
extraKeepTags: string[];
|
135
|
+
history: {
|
136
|
+
records: {
|
137
|
+
stack: {
|
138
|
+
key: number;
|
139
|
+
type: import('alex-editor').AlexElementType;
|
140
|
+
parsedom: string | null;
|
141
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
142
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
143
|
+
textContent: string | null;
|
144
|
+
children: any[] | null;
|
145
|
+
parent: any | null;
|
146
|
+
behavior: "default" | "block";
|
147
|
+
namespace: string | null;
|
148
|
+
locked: boolean;
|
149
|
+
elm: HTMLElement | null;
|
150
|
+
isBlock: () => boolean;
|
151
|
+
isInblock: () => boolean;
|
152
|
+
isInline: () => boolean;
|
153
|
+
isClosed: () => boolean;
|
154
|
+
isText: () => boolean;
|
155
|
+
isBreak: () => boolean;
|
156
|
+
isEmpty: () => boolean;
|
157
|
+
isSpaceText: () => boolean;
|
158
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
159
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
160
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
161
|
+
isOnlyHasBreak: () => boolean;
|
162
|
+
isPreStyle: () => boolean;
|
163
|
+
hasMarks: () => boolean;
|
164
|
+
hasStyles: () => boolean;
|
165
|
+
hasChildren: () => boolean;
|
166
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
167
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
168
|
+
convertToBlock: () => void;
|
169
|
+
toEmpty: () => void;
|
170
|
+
getBlock: () => import('alex-editor').AlexElement;
|
171
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
172
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
173
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
174
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
175
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
176
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
177
|
+
__render: () => void;
|
178
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
179
|
+
}[];
|
180
|
+
range: {
|
181
|
+
anchor: {
|
182
|
+
element: {
|
183
|
+
key: number;
|
184
|
+
type: import('alex-editor').AlexElementType;
|
185
|
+
parsedom: string | null;
|
186
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
187
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
188
|
+
textContent: string | null;
|
189
|
+
children: any[] | null;
|
190
|
+
parent: any | null;
|
191
|
+
behavior: "default" | "block";
|
192
|
+
namespace: string | null;
|
193
|
+
locked: boolean;
|
194
|
+
elm: HTMLElement | null;
|
195
|
+
isBlock: () => boolean;
|
196
|
+
isInblock: () => boolean;
|
197
|
+
isInline: () => boolean;
|
198
|
+
isClosed: () => boolean;
|
199
|
+
isText: () => boolean;
|
200
|
+
isBreak: () => boolean;
|
201
|
+
isEmpty: () => boolean;
|
202
|
+
isSpaceText: () => boolean;
|
203
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
204
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
205
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
206
|
+
isOnlyHasBreak: () => boolean;
|
207
|
+
isPreStyle: () => boolean;
|
208
|
+
hasMarks: () => boolean;
|
209
|
+
hasStyles: () => boolean;
|
210
|
+
hasChildren: () => boolean;
|
211
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
212
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
213
|
+
convertToBlock: () => void;
|
214
|
+
toEmpty: () => void;
|
215
|
+
getBlock: () => import('alex-editor').AlexElement;
|
216
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
217
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
218
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
219
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
220
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
221
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
222
|
+
__render: () => void;
|
223
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
224
|
+
};
|
225
|
+
offset: number;
|
226
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
227
|
+
moveToEnd: (element: import('alex-editor').AlexElement) => void;
|
228
|
+
moveToStart: (element: import('alex-editor').AlexElement) => void;
|
229
|
+
};
|
230
|
+
focus: {
|
231
|
+
element: {
|
232
|
+
key: number;
|
233
|
+
type: import('alex-editor').AlexElementType;
|
234
|
+
parsedom: string | null;
|
235
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
236
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
237
|
+
textContent: string | null;
|
238
|
+
children: any[] | null;
|
239
|
+
parent: any | null;
|
240
|
+
behavior: "default" | "block";
|
241
|
+
namespace: string | null;
|
242
|
+
locked: boolean;
|
243
|
+
elm: HTMLElement | null;
|
244
|
+
isBlock: () => boolean;
|
245
|
+
isInblock: () => boolean;
|
246
|
+
isInline: () => boolean;
|
247
|
+
isClosed: () => boolean;
|
248
|
+
isText: () => boolean;
|
249
|
+
isBreak: () => boolean;
|
250
|
+
isEmpty: () => boolean;
|
251
|
+
isSpaceText: () => boolean;
|
252
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
253
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
254
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
255
|
+
isOnlyHasBreak: () => boolean;
|
256
|
+
isPreStyle: () => boolean;
|
257
|
+
hasMarks: () => boolean;
|
258
|
+
hasStyles: () => boolean;
|
259
|
+
hasChildren: () => boolean;
|
260
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
261
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
262
|
+
convertToBlock: () => void;
|
263
|
+
toEmpty: () => void;
|
264
|
+
getBlock: () => import('alex-editor').AlexElement;
|
265
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
266
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
267
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
268
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
269
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
270
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
271
|
+
__render: () => void;
|
272
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
273
|
+
};
|
274
|
+
offset: number;
|
275
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
276
|
+
moveToEnd: (element: import('alex-editor').AlexElement) => void;
|
277
|
+
moveToStart: (element: import('alex-editor').AlexElement) => void;
|
278
|
+
};
|
279
|
+
} | null;
|
280
|
+
}[];
|
281
|
+
current: number;
|
282
|
+
push: (stack: import('alex-editor').AlexElement[], range?: import('alex-editor').AlexRange | null | undefined) => void;
|
283
|
+
get: (type: 1 | -1) => import('alex-editor').AlexHistoryResultType | null;
|
284
|
+
updateCurrentRange: (range: import('alex-editor').AlexRange) => void;
|
285
|
+
__cloneRange: (newStack: import('alex-editor').AlexElement[], range?: import('alex-editor').AlexRange | null | undefined) => import('alex-editor').AlexRange | null;
|
286
|
+
};
|
287
|
+
stack: {
|
288
|
+
key: number;
|
289
|
+
type: import('alex-editor').AlexElementType;
|
290
|
+
parsedom: string | null;
|
291
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
292
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
293
|
+
textContent: string | null;
|
294
|
+
children: any[] | null;
|
295
|
+
parent: any | null;
|
296
|
+
behavior: "default" | "block";
|
297
|
+
namespace: string | null;
|
298
|
+
locked: boolean;
|
299
|
+
elm: HTMLElement | null;
|
300
|
+
isBlock: () => boolean;
|
301
|
+
isInblock: () => boolean;
|
302
|
+
isInline: () => boolean;
|
303
|
+
isClosed: () => boolean;
|
304
|
+
isText: () => boolean;
|
305
|
+
isBreak: () => boolean;
|
306
|
+
isEmpty: () => boolean;
|
307
|
+
isSpaceText: () => boolean;
|
308
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
309
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
310
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
311
|
+
isOnlyHasBreak: () => boolean;
|
312
|
+
isPreStyle: () => boolean;
|
313
|
+
hasMarks: () => boolean;
|
314
|
+
hasStyles: () => boolean;
|
315
|
+
hasChildren: () => boolean;
|
316
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
317
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
318
|
+
convertToBlock: () => void;
|
319
|
+
toEmpty: () => void;
|
320
|
+
getBlock: () => import('alex-editor').AlexElement;
|
321
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
322
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
323
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
324
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
325
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
326
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
327
|
+
__render: () => void;
|
328
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
329
|
+
}[];
|
330
|
+
range: {
|
331
|
+
anchor: {
|
332
|
+
element: {
|
333
|
+
key: number;
|
334
|
+
type: import('alex-editor').AlexElementType;
|
335
|
+
parsedom: string | null;
|
336
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
337
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
338
|
+
textContent: string | null;
|
339
|
+
children: any[] | null;
|
340
|
+
parent: any | null;
|
341
|
+
behavior: "default" | "block";
|
342
|
+
namespace: string | null;
|
343
|
+
locked: boolean;
|
344
|
+
elm: HTMLElement | null;
|
345
|
+
isBlock: () => boolean;
|
346
|
+
isInblock: () => boolean;
|
347
|
+
isInline: () => boolean;
|
348
|
+
isClosed: () => boolean;
|
349
|
+
isText: () => boolean;
|
350
|
+
isBreak: () => boolean;
|
351
|
+
isEmpty: () => boolean;
|
352
|
+
isSpaceText: () => boolean;
|
353
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
354
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
355
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
356
|
+
isOnlyHasBreak: () => boolean;
|
357
|
+
isPreStyle: () => boolean;
|
358
|
+
hasMarks: () => boolean;
|
359
|
+
hasStyles: () => boolean;
|
360
|
+
hasChildren: () => boolean;
|
361
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
362
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
363
|
+
convertToBlock: () => void;
|
364
|
+
toEmpty: () => void;
|
365
|
+
getBlock: () => import('alex-editor').AlexElement;
|
366
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
367
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
368
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
369
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
370
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
371
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
372
|
+
__render: () => void;
|
373
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
374
|
+
};
|
375
|
+
offset: number;
|
376
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
377
|
+
moveToEnd: (element: import('alex-editor').AlexElement) => void;
|
378
|
+
moveToStart: (element: import('alex-editor').AlexElement) => void;
|
379
|
+
};
|
380
|
+
focus: {
|
381
|
+
element: {
|
382
|
+
key: number;
|
383
|
+
type: import('alex-editor').AlexElementType;
|
384
|
+
parsedom: string | null;
|
385
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
386
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
387
|
+
textContent: string | null;
|
388
|
+
children: any[] | null;
|
389
|
+
parent: any | null;
|
390
|
+
behavior: "default" | "block";
|
391
|
+
namespace: string | null;
|
392
|
+
locked: boolean;
|
393
|
+
elm: HTMLElement | null;
|
394
|
+
isBlock: () => boolean;
|
395
|
+
isInblock: () => boolean;
|
396
|
+
isInline: () => boolean;
|
397
|
+
isClosed: () => boolean;
|
398
|
+
isText: () => boolean;
|
399
|
+
isBreak: () => boolean;
|
400
|
+
isEmpty: () => boolean;
|
401
|
+
isSpaceText: () => boolean;
|
402
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
403
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
404
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
405
|
+
isOnlyHasBreak: () => boolean;
|
406
|
+
isPreStyle: () => boolean;
|
407
|
+
hasMarks: () => boolean;
|
408
|
+
hasStyles: () => boolean;
|
409
|
+
hasChildren: () => boolean;
|
410
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
411
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
412
|
+
convertToBlock: () => void;
|
413
|
+
toEmpty: () => void;
|
414
|
+
getBlock: () => import('alex-editor').AlexElement;
|
415
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
416
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
417
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
418
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
419
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
420
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
421
|
+
__render: () => void;
|
422
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
423
|
+
};
|
424
|
+
offset: number;
|
425
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
426
|
+
moveToEnd: (element: import('alex-editor').AlexElement) => void;
|
427
|
+
moveToStart: (element: import('alex-editor').AlexElement) => void;
|
428
|
+
};
|
429
|
+
} | null;
|
430
|
+
__guid: number;
|
431
|
+
__events: import('alex-editor/lib/core/tool').ObjectType;
|
432
|
+
__firstRender: boolean;
|
433
|
+
__isInputChinese: boolean;
|
434
|
+
__innerSelectionChange: boolean;
|
435
|
+
__chineseInputTimer: any;
|
436
|
+
initRange: () => void;
|
437
|
+
delete: () => void;
|
438
|
+
insertText: (data: string) => void;
|
439
|
+
insertParagraph: () => void;
|
440
|
+
insertElement: (ele: import('alex-editor').AlexElement, cover?: boolean | undefined) => void;
|
441
|
+
formatElementStack: () => void;
|
442
|
+
domRender: (unPushHistory?: boolean | undefined) => void;
|
443
|
+
rangeRender: () => Promise<void>;
|
444
|
+
parseHtml: (html: string) => import('alex-editor').AlexElement[];
|
445
|
+
parseNode: (node: HTMLElement) => import('alex-editor').AlexElement;
|
446
|
+
merge: (ele: import('alex-editor').AlexElement, previousEle: import('alex-editor').AlexElement) => void;
|
447
|
+
getElementByKey: (key: number) => import('alex-editor').AlexElement | null;
|
448
|
+
getPreviousElement: (ele: import('alex-editor').AlexElement) => import('alex-editor').AlexElement | null;
|
449
|
+
getNextElement: (ele: import('alex-editor').AlexElement) => import('alex-editor').AlexElement | null;
|
450
|
+
getPreviousElementOfPoint: (point: import('alex-editor').AlexPoint) => import('alex-editor').AlexElement | null;
|
451
|
+
getNextElementOfPoint: (point: import('alex-editor').AlexPoint) => import('alex-editor').AlexElement | null;
|
452
|
+
getElementsByRange: () => import('alex-editor').AlexElementsRangeType;
|
453
|
+
addElementTo: (childEle: import('alex-editor').AlexElement, parentEle: import('alex-editor').AlexElement, index?: number | undefined) => void;
|
454
|
+
addElementBefore: (newEle: import('alex-editor').AlexElement, targetEle: import('alex-editor').AlexElement) => void;
|
455
|
+
addElementAfter: (newEle: import('alex-editor').AlexElement, targetEle: import('alex-editor').AlexElement) => void;
|
456
|
+
collapseToStart: (element?: import('alex-editor').AlexElement | undefined) => void;
|
457
|
+
collapseToEnd: (element?: import('alex-editor').AlexElement | undefined) => void;
|
458
|
+
setDisabled: () => void;
|
459
|
+
setEnabled: () => void;
|
460
|
+
emit: (eventName: string, ...value: any) => boolean;
|
461
|
+
on: (eventName: string, eventHandle: (...args: any) => void) => void;
|
462
|
+
destroy: () => void;
|
463
|
+
} | null>;
|
464
|
+
isSourceView: import('vue').Ref<boolean>;
|
465
|
+
isFullScreen: import('vue').Ref<boolean>;
|
466
|
+
canUseMenu: import('vue').Ref<boolean>;
|
467
|
+
dataRangeCaches: import('vue').Ref<{
|
468
|
+
list: {
|
469
|
+
element: {
|
470
|
+
key: number;
|
471
|
+
type: import('alex-editor').AlexElementType;
|
472
|
+
parsedom: string | null;
|
473
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
474
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
475
|
+
textContent: string | null;
|
476
|
+
children: any[] | null;
|
477
|
+
parent: any | null;
|
478
|
+
behavior: "default" | "block";
|
479
|
+
namespace: string | null;
|
480
|
+
locked: boolean;
|
481
|
+
elm: HTMLElement | null;
|
482
|
+
isBlock: () => boolean;
|
483
|
+
isInblock: () => boolean;
|
484
|
+
isInline: () => boolean;
|
485
|
+
isClosed: () => boolean;
|
486
|
+
isText: () => boolean;
|
487
|
+
isBreak: () => boolean;
|
488
|
+
isEmpty: () => boolean;
|
489
|
+
isSpaceText: () => boolean;
|
490
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
491
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
492
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
493
|
+
isOnlyHasBreak: () => boolean;
|
494
|
+
isPreStyle: () => boolean;
|
495
|
+
hasMarks: () => boolean;
|
496
|
+
hasStyles: () => boolean;
|
497
|
+
hasChildren: () => boolean;
|
498
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
499
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
500
|
+
convertToBlock: () => void;
|
501
|
+
toEmpty: () => void;
|
502
|
+
getBlock: () => import('alex-editor').AlexElement;
|
503
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
504
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
505
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
506
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
507
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
508
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
509
|
+
__render: () => void;
|
510
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
511
|
+
};
|
512
|
+
offset: false | number[];
|
513
|
+
}[];
|
514
|
+
flatList: {
|
515
|
+
element: {
|
516
|
+
key: number;
|
517
|
+
type: import('alex-editor').AlexElementType;
|
518
|
+
parsedom: string | null;
|
519
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
520
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
521
|
+
textContent: string | null;
|
522
|
+
children: any[] | null;
|
523
|
+
parent: any | null;
|
524
|
+
behavior: "default" | "block";
|
525
|
+
namespace: string | null;
|
526
|
+
locked: boolean;
|
527
|
+
elm: HTMLElement | null;
|
528
|
+
isBlock: () => boolean;
|
529
|
+
isInblock: () => boolean;
|
530
|
+
isInline: () => boolean;
|
531
|
+
isClosed: () => boolean;
|
532
|
+
isText: () => boolean;
|
533
|
+
isBreak: () => boolean;
|
534
|
+
isEmpty: () => boolean;
|
535
|
+
isSpaceText: () => boolean;
|
536
|
+
getUneditableElement: () => import('alex-editor').AlexElement | null;
|
537
|
+
isEqual: (element: import('alex-editor').AlexElement) => boolean;
|
538
|
+
isContains: (element: import('alex-editor').AlexElement) => boolean;
|
539
|
+
isOnlyHasBreak: () => boolean;
|
540
|
+
isPreStyle: () => boolean;
|
541
|
+
hasMarks: () => boolean;
|
542
|
+
hasStyles: () => boolean;
|
543
|
+
hasChildren: () => boolean;
|
544
|
+
hasContains: (element: import('alex-editor').AlexElement) => boolean;
|
545
|
+
clone: (deep?: boolean | undefined) => import('alex-editor').AlexElement;
|
546
|
+
convertToBlock: () => void;
|
547
|
+
toEmpty: () => void;
|
548
|
+
getBlock: () => import('alex-editor').AlexElement;
|
549
|
+
getInblock: () => import('alex-editor').AlexElement | null;
|
550
|
+
getInline: () => import('alex-editor').AlexElement | null;
|
551
|
+
isEqualStyles: (element: import('alex-editor').AlexElement) => boolean;
|
552
|
+
isEqualMarks: (element: import('alex-editor').AlexElement) => boolean;
|
553
|
+
isFirst: (element: import('alex-editor').AlexElement) => boolean;
|
554
|
+
isLast: (element: import('alex-editor').AlexElement) => boolean;
|
555
|
+
__render: () => void;
|
556
|
+
__fullClone: () => import('alex-editor').AlexElement;
|
557
|
+
};
|
558
|
+
offset: false | number[];
|
559
|
+
}[];
|
560
|
+
}>;
|
561
|
+
textValue: import('vue').ComputedRef<string>;
|
562
|
+
collapseToEnd: () => void;
|
563
|
+
collapseToStart: () => void;
|
564
|
+
undo: () => void;
|
565
|
+
redo: () => void;
|
566
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
567
|
+
"update:modelValue": (...args: any[]) => void;
|
568
|
+
change: (...args: any[]) => void;
|
569
|
+
blur: (...args: any[]) => void;
|
570
|
+
focus: (...args: any[]) => void;
|
571
|
+
keydown: (...args: any[]) => void;
|
572
|
+
keyup: (...args: any[]) => void;
|
573
|
+
insertparagraph: (...args: any[]) => void;
|
574
|
+
rangeupdate: (...args: any[]) => void;
|
575
|
+
updateview: (...args: any[]) => void;
|
576
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
577
|
+
locale: {
|
578
|
+
type: import('vue').PropType<import('./locale').LocaleType>;
|
579
|
+
default: string;
|
580
|
+
};
|
581
|
+
modelValue: {
|
582
|
+
type: StringConstructor;
|
583
|
+
default: string;
|
584
|
+
};
|
585
|
+
placeholder: {
|
586
|
+
type: StringConstructor;
|
587
|
+
default: string;
|
588
|
+
};
|
589
|
+
autofocus: {
|
590
|
+
type: BooleanConstructor;
|
591
|
+
default: boolean;
|
592
|
+
};
|
593
|
+
disabled: {
|
594
|
+
type: BooleanConstructor;
|
595
|
+
default: boolean;
|
596
|
+
};
|
597
|
+
allowCopy: {
|
598
|
+
type: BooleanConstructor;
|
599
|
+
default: boolean;
|
600
|
+
};
|
601
|
+
allowPaste: {
|
602
|
+
type: BooleanConstructor;
|
603
|
+
default: boolean;
|
604
|
+
};
|
605
|
+
allowCut: {
|
606
|
+
type: BooleanConstructor;
|
607
|
+
default: boolean;
|
608
|
+
};
|
609
|
+
allowPasteHtml: {
|
610
|
+
type: BooleanConstructor;
|
611
|
+
default: boolean;
|
612
|
+
};
|
613
|
+
border: {
|
614
|
+
type: BooleanConstructor;
|
615
|
+
default: boolean;
|
616
|
+
};
|
617
|
+
color: {
|
618
|
+
type: import('vue').PropType<string | null>;
|
619
|
+
default: string;
|
620
|
+
validator(value: any): boolean;
|
621
|
+
};
|
622
|
+
videoRatio: {
|
623
|
+
type: NumberConstructor;
|
624
|
+
default: number;
|
625
|
+
};
|
626
|
+
toolbar: {
|
627
|
+
type: import('vue').PropType<import('./core/tool').ToolbarConfigType>;
|
628
|
+
default: null;
|
629
|
+
};
|
630
|
+
showWordLength: {
|
631
|
+
type: BooleanConstructor;
|
632
|
+
default: boolean;
|
633
|
+
};
|
634
|
+
customTextPaste: {
|
635
|
+
type: import('vue').PropType<(data: string) => void | Promise<void>>;
|
636
|
+
default: null;
|
637
|
+
};
|
638
|
+
customHtmlPaste: {
|
639
|
+
type: import('vue').PropType<(elements: import('alex-editor').AlexElement[]) => void | Promise<void>>;
|
640
|
+
default: null;
|
641
|
+
};
|
642
|
+
customImagePaste: {
|
643
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
644
|
+
default: null;
|
645
|
+
};
|
646
|
+
customVideoPaste: {
|
647
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
648
|
+
default: null;
|
649
|
+
};
|
650
|
+
customFilePaste: {
|
651
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
652
|
+
default: null;
|
653
|
+
};
|
654
|
+
menu: {
|
655
|
+
type: import('vue').PropType<import('./core/tool').MenuConfigType>;
|
656
|
+
default: null;
|
657
|
+
};
|
658
|
+
pasteKeepMarks: {
|
659
|
+
type: import('vue').PropType<(el: import('alex-editor').AlexElement) => import('./core/tool').ObjectType>;
|
660
|
+
default: null;
|
661
|
+
};
|
662
|
+
pasteKeepStyles: {
|
663
|
+
type: import('vue').PropType<(el: import('alex-editor').AlexElement) => import('./core/tool').ObjectType>;
|
664
|
+
default: null;
|
665
|
+
};
|
666
|
+
customParseNode: {
|
667
|
+
type: import('vue').PropType<(el: import('alex-editor').AlexElement) => import('alex-editor').AlexElement>;
|
668
|
+
default: null;
|
669
|
+
};
|
670
|
+
extraKeepTags: {
|
671
|
+
type: import('vue').PropType<string[]>;
|
672
|
+
default: () => never[];
|
673
|
+
};
|
674
|
+
renderRules: {
|
675
|
+
type: import('vue').PropType<((el: import('alex-editor').AlexElement) => void)[]>;
|
676
|
+
default: () => never[];
|
677
|
+
};
|
678
|
+
autoheight: {
|
679
|
+
type: BooleanConstructor;
|
680
|
+
default: boolean;
|
681
|
+
};
|
682
|
+
tab: {
|
683
|
+
type: BooleanConstructor;
|
684
|
+
default: boolean;
|
685
|
+
};
|
686
|
+
plugins: {
|
687
|
+
type: import('vue').PropType<import('./core/tool').PluginType[]>;
|
688
|
+
default: () => never[];
|
689
|
+
};
|
690
|
+
}>> & {
|
691
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
692
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
693
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
694
|
+
onKeydown?: ((...args: any[]) => any) | undefined;
|
695
|
+
onKeyup?: ((...args: any[]) => any) | undefined;
|
696
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
697
|
+
onInsertparagraph?: ((...args: any[]) => any) | undefined;
|
698
|
+
onRangeupdate?: ((...args: any[]) => any) | undefined;
|
699
|
+
onUpdateview?: ((...args: any[]) => any) | undefined;
|
700
|
+
}, {
|
701
|
+
color: string | null;
|
702
|
+
disabled: boolean;
|
703
|
+
menu: import('./core/tool').MenuConfigType;
|
704
|
+
modelValue: string;
|
705
|
+
border: boolean;
|
706
|
+
placeholder: string;
|
707
|
+
autoheight: boolean;
|
708
|
+
toolbar: import('./core/tool').ToolbarConfigType;
|
709
|
+
locale: import('./locale').LocaleType;
|
710
|
+
autofocus: boolean;
|
711
|
+
allowCopy: boolean;
|
712
|
+
allowPaste: boolean;
|
713
|
+
allowCut: boolean;
|
714
|
+
allowPasteHtml: boolean;
|
715
|
+
videoRatio: number;
|
716
|
+
showWordLength: boolean;
|
717
|
+
customTextPaste: (data: string) => void | Promise<void>;
|
718
|
+
customHtmlPaste: (elements: import('alex-editor').AlexElement[]) => void | Promise<void>;
|
719
|
+
customImagePaste: (file: File) => void | Promise<void>;
|
720
|
+
customVideoPaste: (file: File) => void | Promise<void>;
|
721
|
+
customFilePaste: (file: File) => void | Promise<void>;
|
722
|
+
pasteKeepMarks: (el: import('alex-editor').AlexElement) => import('./core/tool').ObjectType;
|
723
|
+
pasteKeepStyles: (el: import('alex-editor').AlexElement) => import('./core/tool').ObjectType;
|
724
|
+
customParseNode: (el: import('alex-editor').AlexElement) => import('alex-editor').AlexElement;
|
725
|
+
extraKeepTags: string[];
|
726
|
+
renderRules: ((el: import('alex-editor').AlexElement) => void)[];
|
727
|
+
tab: boolean;
|
728
|
+
plugins: import('./core/tool').PluginType[];
|
729
|
+
}, {}>>;
|
4
730
|
export type { ButtonTypeType, ButtonOptionsItemType, ButtonSelectConfigType, ButtonDisplayConfigType } from './components/button/props';
|
5
731
|
export type { InsertImageUploadErrorType } from './components/insertImage/props';
|
6
732
|
export type { InsertVideoUploadErrorType } from './components/insertVideo/props';
|
7
733
|
export type { MenuButtonType, MenuSelectButtonType, MenuDisplayButtonType, MenuImageButtonType, MenuVideoButtonType, MenuTableButtonType, MenuCustomButtonType, CodeBlockToolbarType, TextToolbarType, ToolbarConfigType, MenuSequenceType, MenuModeType, MenuExtendType, MenuConfigType, PluginType, PluginResultType } from './core/tool';
|
8
734
|
export type { ElementMatchConfigType } from './core/function';
|
9
735
|
export { elementIsMatch, getMatchElementByElement, getMatchElementByRange, isList, isTask, elementIsInList, elementIsInTask, hasPreInRange, hasQuoteInRange, hasListInRange, hasTaskInRange, hasLinkInRange, hasTableInRange, hasImageInRange, hasVideoInRange, isRangeInQuote, isRangeInList, isRangeInTask, queryTextStyle, queryTextMark, getRangeText, setIndentIncrease, setIndentDecrease, setQuote, setAlign, setList, setTask, setTextStyle, setTextMark, removeTextStyle, removeTextMark, setLineHeight, insertLink, insertImage, insertVideo, insertTable, insertCodeBlock, insertSeparator } from './core/function';
|
10
|
-
declare const install:
|
11
|
-
declare const version = "0.1
|
736
|
+
declare const install: (app: App) => void;
|
737
|
+
declare const version = "0.2.1";
|
12
738
|
export { AlexElement } from 'alex-editor';
|
13
739
|
export type { AttachmentOptionsType } from './plugins/attachment';
|
14
740
|
export type { InsertAttachmentUploadErrorType } from './plugins/attachment/insertAttachment/props';
|
@@ -19,4 +745,4 @@ export type { PanelOptionsType } from './plugins/panel';
|
|
19
745
|
export { panel, isPanel, isUnderPanel, getPanelElement, hasPanelInRange, getPanelElementByRange } from './plugins/panel';
|
20
746
|
export type { InfoBlockOptionsType } from './plugins/infoBlock';
|
21
747
|
export { infoBlock, isInfoBlock, isUnderInfoBlock, getInfoBlockElement, hasInfoBlockInRange, getInfoBlockElementByRange } from './plugins/infoBlock';
|
22
|
-
export {
|
748
|
+
export { Editify as default, Editify, install, version };
|