vue-editify 0.1.36 → 0.1.39
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 +5 -8
- package/lib/components/button/button.vue.d.ts +13 -13
- package/lib/components/button/props.d.ts +1 -1
- package/lib/components/checkbox/checkbox.vue.d.ts +10 -10
- package/lib/components/checkbox/props.d.ts +1 -1
- package/lib/components/colors/colors.vue.d.ts +6 -6
- package/lib/components/colors/props.d.ts +1 -1
- package/lib/components/icon/icon.vue.d.ts +1 -1
- package/lib/components/insertImage/insertImage.vue.d.ts +11 -11
- package/lib/components/insertLink/insertLink.vue.d.ts +4 -4
- package/lib/components/insertTable/insertTable.vue.d.ts +4 -4
- package/lib/components/insertVideo/insertVideo.vue.d.ts +11 -11
- package/lib/components/layer/layer.vue.d.ts +9 -9
- package/lib/components/menu/menu.vue.d.ts +6 -6
- package/lib/components/menu/props.d.ts +1 -1
- package/lib/components/toolbar/props.d.ts +1 -1
- package/lib/components/toolbar/toolbar.vue.d.ts +11 -11
- package/lib/components/tooltip/tooltip.vue.d.ts +1 -1
- package/lib/components/triangle/triangle.vue.d.ts +4 -4
- package/lib/core/function.d.ts +8 -1
- package/lib/core/rule.d.ts +3 -3
- package/lib/core/tool.d.ts +9 -11
- package/lib/editify/editify.vue.d.ts +110 -84
- package/lib/editify/props.d.ts +9 -5
- package/lib/editify.es.js +15226 -418
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +6 -4
- package/lib/plugins/attachment/index.d.ts +3 -2
- package/lib/plugins/attachment/insertAttachment/insertAttachment.vue.d.ts +11 -11
- package/lib/plugins/mathformula/index.d.ts +31 -0
- package/lib/plugins/mathformula/insertMathformula/insertMathformula.vue.d.ts +18 -0
- package/lib/plugins/mathformula/insertMathformula/props.d.ts +9 -0
- package/lib/style.css +1 -1
- package/package.json +4 -2
- package/src/components/insertImage/insertImage.less +1 -0
- package/src/components/insertLink/insertLink.less +1 -0
- package/src/components/insertVideo/insertVideo.less +1 -0
- package/src/components/menu/menu.vue +33 -1
- package/src/components/tooltip/tooltip.less +2 -2
- package/src/core/function.ts +18 -6
- package/src/core/rule.ts +34 -11
- package/src/core/tool.ts +48 -67
- package/src/css/base.less +2 -0
- package/src/editify/editify.less +12 -3
- package/src/editify/editify.vue +113 -39
- package/src/editify/props.ts +11 -4
- package/src/icon/iconfont.css +8 -16
- package/src/icon/iconfont.ttf +0 -0
- package/src/icon/iconfont.woff +0 -0
- package/src/index.ts +7 -5
- package/src/locale/en_US.ts +7 -1
- package/src/locale/zh_CN.ts +8 -2
- package/src/plugins/attachment/index.ts +39 -25
- package/src/plugins/attachment/insertAttachment/insertAttachment.less +1 -0
- package/src/plugins/mathformula/index.ts +210 -0
- package/src/plugins/mathformula/insertMathformula/insertMathformula.less +64 -0
- package/src/plugins/mathformula/insertMathformula/insertMathformula.vue +40 -0
- package/src/plugins/mathformula/insertMathformula/props.ts +11 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{
|
2
2
|
placement: {
|
3
|
-
type: import(
|
3
|
+
type: import('vue').PropType<import('./props').TrianglePlacementType>;
|
4
4
|
default: string;
|
5
5
|
validator(value: any): boolean;
|
6
6
|
};
|
@@ -12,9 +12,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
12
12
|
type: StringConstructor;
|
13
13
|
default: null;
|
14
14
|
};
|
15
|
-
}, {}, unknown, {}, {}, import(
|
15
|
+
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
16
16
|
placement: {
|
17
|
-
type: import(
|
17
|
+
type: import('vue').PropType<import('./props').TrianglePlacementType>;
|
18
18
|
default: string;
|
19
19
|
validator(value: any): boolean;
|
20
20
|
};
|
@@ -27,7 +27,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
27
27
|
default: null;
|
28
28
|
};
|
29
29
|
}>>, {
|
30
|
-
placement: import(
|
30
|
+
placement: import('./props').TrianglePlacementType;
|
31
31
|
color: string;
|
32
32
|
background: string;
|
33
33
|
}, {}>;
|
package/lib/core/function.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ObjectType } from './tool';
|
2
1
|
import { AlexElement, AlexElementsRangeType, AlexEditor } from 'alex-editor';
|
2
|
+
import { ObjectType } from './tool';
|
3
3
|
|
4
4
|
/**
|
5
5
|
* 判断元素是否在某个标签下,如果是返回该标签对应的元素,否则返回null
|
@@ -308,3 +308,10 @@ export declare const insertTable: (editor: AlexEditor, rowLength: number, colLen
|
|
308
308
|
* @returns
|
309
309
|
*/
|
310
310
|
export declare const insertCodeBlock: (editor: AlexEditor, dataRangeCaches: AlexElementsRangeType) => void;
|
311
|
+
/**
|
312
|
+
* 插入分隔线
|
313
|
+
* @param editor
|
314
|
+
* @param dataRangeCaches
|
315
|
+
* @returns
|
316
|
+
*/
|
317
|
+
export declare const insertSeparator: (editor: AlexEditor) => void;
|
package/lib/core/rule.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { LanguagesItemType } from '../hljs';
|
2
1
|
import { AlexEditor, AlexElement } from 'alex-editor';
|
2
|
+
import { LanguagesItemType } from '../hljs';
|
3
3
|
|
4
4
|
/**
|
5
5
|
* 元素格式化时转换ol和li标签
|
@@ -14,11 +14,11 @@ export declare const parseList: (editor: AlexEditor, element: AlexElement) => vo
|
|
14
14
|
*/
|
15
15
|
export declare const orderdListHandle: (editor: AlexEditor, element: AlexElement) => void;
|
16
16
|
/**
|
17
|
-
*
|
17
|
+
* 元素格式化时处理常规元素(图片、视频、分隔线、行内代码)
|
18
18
|
* @param editor
|
19
19
|
* @param element
|
20
20
|
*/
|
21
|
-
export declare const
|
21
|
+
export declare const commonElementHandle: (editor: AlexEditor, element: AlexElement) => void;
|
22
22
|
/**
|
23
23
|
* 元素格式化时处理表格
|
24
24
|
* @param editor
|
package/lib/core/tool.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { default as Button } from '../components/button/button.vue';
|
2
|
-
import { ComponentInternalInstance, VNode } from 'vue';
|
3
|
-
import { InsertImageUploadErrorType } from '../components/insertImage/props';
|
4
|
-
import { LocaleType } from '../locale';
|
5
|
-
import { ButtonOptionsItemType, ButtonTypeType } from '../components/button/props';
|
6
1
|
import { AlexElement } from 'alex-editor';
|
2
|
+
import { ButtonOptionsItemType, ButtonTypeType } from '../components/button/props';
|
3
|
+
import { LocaleType } from '../locale';
|
4
|
+
import { InsertImageUploadErrorType } from '../components/insertImage/props';
|
5
|
+
import { ComponentInternalInstance, VNode } from 'vue';
|
6
|
+
import { default as Button } from '../components/button/button.vue';
|
7
7
|
|
8
8
|
export type ObjectType = {
|
9
9
|
[key: string]: any;
|
@@ -150,6 +150,7 @@ export type MenuConfigType = {
|
|
150
150
|
heading?: MenuDisplayButtonType;
|
151
151
|
indent?: MenuSelectButtonType;
|
152
152
|
quote?: MenuButtonType;
|
153
|
+
separator?: MenuButtonType;
|
153
154
|
align?: MenuSelectButtonType;
|
154
155
|
orderList?: MenuButtonType;
|
155
156
|
unorderList?: MenuButtonType;
|
@@ -186,15 +187,12 @@ export type PluginResultType = {
|
|
186
187
|
menu?: PluginMenuConfigType;
|
187
188
|
updateView?: () => void;
|
188
189
|
customParseNode?: (element: AlexElement) => AlexElement;
|
190
|
+
extraKeepTags?: string[];
|
189
191
|
renderRule?: (el: AlexElement) => void;
|
190
|
-
|
191
|
-
|
192
|
+
pasteKeepMarks?: (el: AlexElement) => ObjectType;
|
193
|
+
pasteKeepStyles?: (el: AlexElement) => ObjectType;
|
192
194
|
};
|
193
195
|
export type PluginType = (editifyInstance: ComponentInternalInstance, editTrans: (key: string) => any) => PluginResultType;
|
194
|
-
/**
|
195
|
-
* 粘贴html时保留的数据
|
196
|
-
*/
|
197
|
-
export declare const pasteKeepData: ObjectType;
|
198
196
|
/**
|
199
197
|
* 对象平替值方法
|
200
198
|
* @param o1
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { MenuConfigType, ObjectType, ToolbarConfigType } from '../core/tool';
|
2
1
|
import { AlexElement, AlexElementsRangeType } from 'alex-editor';
|
2
|
+
import { MenuConfigType, ObjectType, ToolbarConfigType } from '../core/tool';
|
3
3
|
|
4
4
|
declare const _default: import('vue').DefineComponent<{
|
5
5
|
locale: {
|
6
|
-
type: import(
|
6
|
+
type: import('vue').PropType<import('../locale').LocaleType>;
|
7
7
|
default: string;
|
8
8
|
};
|
9
9
|
modelValue: {
|
@@ -43,7 +43,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
43
43
|
default: boolean;
|
44
44
|
};
|
45
45
|
color: {
|
46
|
-
type: import(
|
46
|
+
type: import('vue').PropType<string | null>;
|
47
47
|
default: string;
|
48
48
|
validator(value: any): boolean;
|
49
49
|
};
|
@@ -52,7 +52,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
52
52
|
default: number;
|
53
53
|
};
|
54
54
|
toolbar: {
|
55
|
-
type: import(
|
55
|
+
type: import('vue').PropType<ToolbarConfigType>;
|
56
56
|
default: null;
|
57
57
|
};
|
58
58
|
showWordLength: {
|
@@ -60,43 +60,47 @@ declare const _default: import('vue').DefineComponent<{
|
|
60
60
|
default: boolean;
|
61
61
|
};
|
62
62
|
customTextPaste: {
|
63
|
-
type: import(
|
63
|
+
type: import('vue').PropType<(data: string) => void | Promise<void>>;
|
64
64
|
default: null;
|
65
65
|
};
|
66
66
|
customHtmlPaste: {
|
67
|
-
type: import(
|
67
|
+
type: import('vue').PropType<(elements: AlexElement[]) => void | Promise<void>>;
|
68
68
|
default: null;
|
69
69
|
};
|
70
70
|
customImagePaste: {
|
71
|
-
type: import(
|
71
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
72
72
|
default: null;
|
73
73
|
};
|
74
74
|
customVideoPaste: {
|
75
|
-
type: import(
|
75
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
76
76
|
default: null;
|
77
77
|
};
|
78
78
|
customFilePaste: {
|
79
|
-
type: import(
|
79
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
80
80
|
default: null;
|
81
81
|
};
|
82
82
|
menu: {
|
83
|
-
type: import(
|
83
|
+
type: import('vue').PropType<MenuConfigType>;
|
84
84
|
default: null;
|
85
85
|
};
|
86
86
|
pasteKeepMarks: {
|
87
|
-
type: import(
|
87
|
+
type: import('vue').PropType<(el: AlexElement) => ObjectType>;
|
88
88
|
default: null;
|
89
89
|
};
|
90
90
|
pasteKeepStyles: {
|
91
|
-
type: import(
|
91
|
+
type: import('vue').PropType<(el: AlexElement) => ObjectType>;
|
92
92
|
default: null;
|
93
93
|
};
|
94
94
|
customParseNode: {
|
95
|
-
type: import(
|
95
|
+
type: import('vue').PropType<(el: AlexElement) => AlexElement>;
|
96
96
|
default: null;
|
97
97
|
};
|
98
|
+
extraKeepTags: {
|
99
|
+
type: import('vue').PropType<string[]>;
|
100
|
+
default: () => never[];
|
101
|
+
};
|
98
102
|
renderRules: {
|
99
|
-
type: import(
|
103
|
+
type: import('vue').PropType<((el: AlexElement) => void)[]>;
|
100
104
|
default: () => never[];
|
101
105
|
};
|
102
106
|
autoheight: {
|
@@ -108,11 +112,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
108
112
|
default: boolean;
|
109
113
|
};
|
110
114
|
plugins: {
|
111
|
-
type: import(
|
115
|
+
type: import('vue').PropType<import('../core/tool').PluginType[]>;
|
112
116
|
default: () => never[];
|
113
117
|
};
|
114
118
|
}, {
|
115
|
-
editor: import(
|
119
|
+
editor: import('vue').Ref<{
|
116
120
|
$el: HTMLElement;
|
117
121
|
disabled: boolean;
|
118
122
|
value: string;
|
@@ -128,18 +132,21 @@ declare const _default: import('vue').DefineComponent<{
|
|
128
132
|
customFilePaste: ((file: File) => void | Promise<void>) | null;
|
129
133
|
customMerge: ((mergeElement: AlexElement, targetElement: AlexElement) => void | Promise<void>) | null;
|
130
134
|
customParseNode: ((el: AlexElement) => AlexElement) | null;
|
135
|
+
extraKeepTags: string[];
|
131
136
|
history: {
|
132
137
|
records: {
|
133
138
|
stack: {
|
134
139
|
key: number;
|
135
|
-
type: import(
|
140
|
+
type: import('alex-editor').AlexElementType;
|
136
141
|
parsedom: string | null;
|
137
|
-
marks: import(
|
138
|
-
styles: import(
|
142
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
143
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
139
144
|
textContent: string | null;
|
140
145
|
children: any[] | null;
|
141
146
|
parent: any | null;
|
142
|
-
behavior
|
147
|
+
behavior: "default" | "block";
|
148
|
+
namespace: string | null;
|
149
|
+
locked: boolean;
|
143
150
|
elm: HTMLElement | null;
|
144
151
|
isBlock: () => boolean;
|
145
152
|
isInblock: () => boolean;
|
@@ -175,14 +182,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
175
182
|
anchor: {
|
176
183
|
element: {
|
177
184
|
key: number;
|
178
|
-
type: import(
|
185
|
+
type: import('alex-editor').AlexElementType;
|
179
186
|
parsedom: string | null;
|
180
|
-
marks: import(
|
181
|
-
styles: import(
|
187
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
188
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
182
189
|
textContent: string | null;
|
183
190
|
children: any[] | null;
|
184
191
|
parent: any | null;
|
185
|
-
behavior
|
192
|
+
behavior: "default" | "block";
|
193
|
+
namespace: string | null;
|
194
|
+
locked: boolean;
|
186
195
|
elm: HTMLElement | null;
|
187
196
|
isBlock: () => boolean;
|
188
197
|
isInblock: () => boolean;
|
@@ -215,21 +224,23 @@ declare const _default: import('vue').DefineComponent<{
|
|
215
224
|
__fullClone: () => AlexElement;
|
216
225
|
};
|
217
226
|
offset: number;
|
218
|
-
isEqual: (point: import(
|
227
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
219
228
|
moveToEnd: (element: AlexElement) => void;
|
220
229
|
moveToStart: (element: AlexElement) => void;
|
221
230
|
};
|
222
231
|
focus: {
|
223
232
|
element: {
|
224
233
|
key: number;
|
225
|
-
type: import(
|
234
|
+
type: import('alex-editor').AlexElementType;
|
226
235
|
parsedom: string | null;
|
227
|
-
marks: import(
|
228
|
-
styles: import(
|
236
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
237
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
229
238
|
textContent: string | null;
|
230
239
|
children: any[] | null;
|
231
240
|
parent: any | null;
|
232
|
-
behavior
|
241
|
+
behavior: "default" | "block";
|
242
|
+
namespace: string | null;
|
243
|
+
locked: boolean;
|
233
244
|
elm: HTMLElement | null;
|
234
245
|
isBlock: () => boolean;
|
235
246
|
isInblock: () => boolean;
|
@@ -262,28 +273,30 @@ declare const _default: import('vue').DefineComponent<{
|
|
262
273
|
__fullClone: () => AlexElement;
|
263
274
|
};
|
264
275
|
offset: number;
|
265
|
-
isEqual: (point: import(
|
276
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
266
277
|
moveToEnd: (element: AlexElement) => void;
|
267
278
|
moveToStart: (element: AlexElement) => void;
|
268
279
|
};
|
269
280
|
} | null;
|
270
281
|
}[];
|
271
282
|
current: number;
|
272
|
-
push: (stack: AlexElement[], range?: import(
|
273
|
-
get: (type: 1 | -1) => import(
|
274
|
-
updateCurrentRange: (range: import(
|
275
|
-
__cloneRange: (newStack: AlexElement[], range?: import(
|
283
|
+
push: (stack: AlexElement[], range?: import('alex-editor').AlexRange | null | undefined) => void;
|
284
|
+
get: (type: 1 | -1) => import('alex-editor').AlexHistoryResultType | null;
|
285
|
+
updateCurrentRange: (range: import('alex-editor').AlexRange) => void;
|
286
|
+
__cloneRange: (newStack: AlexElement[], range?: import('alex-editor').AlexRange | null | undefined) => import('alex-editor').AlexRange | null;
|
276
287
|
};
|
277
288
|
stack: {
|
278
289
|
key: number;
|
279
|
-
type: import(
|
290
|
+
type: import('alex-editor').AlexElementType;
|
280
291
|
parsedom: string | null;
|
281
|
-
marks: import(
|
282
|
-
styles: import(
|
292
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
293
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
283
294
|
textContent: string | null;
|
284
295
|
children: any[] | null;
|
285
296
|
parent: any | null;
|
286
|
-
behavior
|
297
|
+
behavior: "default" | "block";
|
298
|
+
namespace: string | null;
|
299
|
+
locked: boolean;
|
287
300
|
elm: HTMLElement | null;
|
288
301
|
isBlock: () => boolean;
|
289
302
|
isInblock: () => boolean;
|
@@ -319,14 +332,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
319
332
|
anchor: {
|
320
333
|
element: {
|
321
334
|
key: number;
|
322
|
-
type: import(
|
335
|
+
type: import('alex-editor').AlexElementType;
|
323
336
|
parsedom: string | null;
|
324
|
-
marks: import(
|
325
|
-
styles: import(
|
337
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
338
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
326
339
|
textContent: string | null;
|
327
340
|
children: any[] | null;
|
328
341
|
parent: any | null;
|
329
|
-
behavior
|
342
|
+
behavior: "default" | "block";
|
343
|
+
namespace: string | null;
|
344
|
+
locked: boolean;
|
330
345
|
elm: HTMLElement | null;
|
331
346
|
isBlock: () => boolean;
|
332
347
|
isInblock: () => boolean;
|
@@ -359,21 +374,23 @@ declare const _default: import('vue').DefineComponent<{
|
|
359
374
|
__fullClone: () => AlexElement;
|
360
375
|
};
|
361
376
|
offset: number;
|
362
|
-
isEqual: (point: import(
|
377
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
363
378
|
moveToEnd: (element: AlexElement) => void;
|
364
379
|
moveToStart: (element: AlexElement) => void;
|
365
380
|
};
|
366
381
|
focus: {
|
367
382
|
element: {
|
368
383
|
key: number;
|
369
|
-
type: import(
|
384
|
+
type: import('alex-editor').AlexElementType;
|
370
385
|
parsedom: string | null;
|
371
|
-
marks: import(
|
372
|
-
styles: import(
|
386
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
387
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
373
388
|
textContent: string | null;
|
374
389
|
children: any[] | null;
|
375
390
|
parent: any | null;
|
376
|
-
behavior
|
391
|
+
behavior: "default" | "block";
|
392
|
+
namespace: string | null;
|
393
|
+
locked: boolean;
|
377
394
|
elm: HTMLElement | null;
|
378
395
|
isBlock: () => boolean;
|
379
396
|
isInblock: () => boolean;
|
@@ -406,13 +423,13 @@ declare const _default: import('vue').DefineComponent<{
|
|
406
423
|
__fullClone: () => AlexElement;
|
407
424
|
};
|
408
425
|
offset: number;
|
409
|
-
isEqual: (point: import(
|
426
|
+
isEqual: (point: import('alex-editor').AlexPoint) => boolean;
|
410
427
|
moveToEnd: (element: AlexElement) => void;
|
411
428
|
moveToStart: (element: AlexElement) => void;
|
412
429
|
};
|
413
430
|
} | null;
|
414
431
|
__guid: number;
|
415
|
-
__events: import(
|
432
|
+
__events: import('alex-editor/lib/core/tool').ObjectType;
|
416
433
|
__firstRender: boolean;
|
417
434
|
__isInputChinese: boolean;
|
418
435
|
__innerSelectionChange: boolean;
|
@@ -431,8 +448,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
431
448
|
getElementByKey: (key: number) => AlexElement | null;
|
432
449
|
getPreviousElement: (ele: AlexElement) => AlexElement | null;
|
433
450
|
getNextElement: (ele: AlexElement) => AlexElement | null;
|
434
|
-
getPreviousElementOfPoint: (point: import(
|
435
|
-
getNextElementOfPoint: (point: import(
|
451
|
+
getPreviousElementOfPoint: (point: import('alex-editor').AlexPoint) => AlexElement | null;
|
452
|
+
getNextElementOfPoint: (point: import('alex-editor').AlexPoint) => AlexElement | null;
|
436
453
|
getElementsByRange: () => AlexElementsRangeType;
|
437
454
|
addElementTo: (childEle: AlexElement, parentEle: AlexElement, index?: number | undefined) => void;
|
438
455
|
addElementBefore: (newEle: AlexElement, targetEle: AlexElement) => void;
|
@@ -445,21 +462,23 @@ declare const _default: import('vue').DefineComponent<{
|
|
445
462
|
on: (eventName: string, eventHandle: (...args: any) => void) => void;
|
446
463
|
destroy: () => void;
|
447
464
|
} | null>;
|
448
|
-
isSourceView: import(
|
449
|
-
isFullScreen: import(
|
450
|
-
canUseMenu: import(
|
451
|
-
dataRangeCaches: import(
|
465
|
+
isSourceView: import('vue').Ref<boolean>;
|
466
|
+
isFullScreen: import('vue').Ref<boolean>;
|
467
|
+
canUseMenu: import('vue').Ref<boolean>;
|
468
|
+
dataRangeCaches: import('vue').Ref<{
|
452
469
|
list: {
|
453
470
|
element: {
|
454
471
|
key: number;
|
455
|
-
type: import(
|
472
|
+
type: import('alex-editor').AlexElementType;
|
456
473
|
parsedom: string | null;
|
457
|
-
marks: import(
|
458
|
-
styles: import(
|
474
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
475
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
459
476
|
textContent: string | null;
|
460
477
|
children: any[] | null;
|
461
478
|
parent: any | null;
|
462
|
-
behavior
|
479
|
+
behavior: "default" | "block";
|
480
|
+
namespace: string | null;
|
481
|
+
locked: boolean;
|
463
482
|
elm: HTMLElement | null;
|
464
483
|
isBlock: () => boolean;
|
465
484
|
isInblock: () => boolean;
|
@@ -496,14 +515,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
496
515
|
flatList: {
|
497
516
|
element: {
|
498
517
|
key: number;
|
499
|
-
type: import(
|
518
|
+
type: import('alex-editor').AlexElementType;
|
500
519
|
parsedom: string | null;
|
501
|
-
marks: import(
|
502
|
-
styles: import(
|
520
|
+
marks: import('alex-editor/lib/core/tool').ObjectType | null;
|
521
|
+
styles: import('alex-editor/lib/core/tool').ObjectType | null;
|
503
522
|
textContent: string | null;
|
504
523
|
children: any[] | null;
|
505
524
|
parent: any | null;
|
506
|
-
behavior
|
525
|
+
behavior: "default" | "block";
|
526
|
+
namespace: string | null;
|
527
|
+
locked: boolean;
|
507
528
|
elm: HTMLElement | null;
|
508
529
|
isBlock: () => boolean;
|
509
530
|
isInblock: () => boolean;
|
@@ -538,12 +559,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
538
559
|
offset: false | number[];
|
539
560
|
}[];
|
540
561
|
}>;
|
541
|
-
textValue: import(
|
562
|
+
textValue: import('vue').ComputedRef<string>;
|
542
563
|
collapseToEnd: () => void;
|
543
564
|
collapseToStart: () => void;
|
544
565
|
undo: () => void;
|
545
566
|
redo: () => void;
|
546
|
-
}, unknown, {}, {}, import(
|
567
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
547
568
|
"update:modelValue": (...args: any[]) => void;
|
548
569
|
change: (...args: any[]) => void;
|
549
570
|
blur: (...args: any[]) => void;
|
@@ -553,9 +574,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
553
574
|
insertparagraph: (...args: any[]) => void;
|
554
575
|
rangeupdate: (...args: any[]) => void;
|
555
576
|
updateview: (...args: any[]) => void;
|
556
|
-
}, string, import(
|
577
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
557
578
|
locale: {
|
558
|
-
type: import(
|
579
|
+
type: import('vue').PropType<import('../locale').LocaleType>;
|
559
580
|
default: string;
|
560
581
|
};
|
561
582
|
modelValue: {
|
@@ -595,7 +616,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
595
616
|
default: boolean;
|
596
617
|
};
|
597
618
|
color: {
|
598
|
-
type: import(
|
619
|
+
type: import('vue').PropType<string | null>;
|
599
620
|
default: string;
|
600
621
|
validator(value: any): boolean;
|
601
622
|
};
|
@@ -604,7 +625,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
604
625
|
default: number;
|
605
626
|
};
|
606
627
|
toolbar: {
|
607
|
-
type: import(
|
628
|
+
type: import('vue').PropType<ToolbarConfigType>;
|
608
629
|
default: null;
|
609
630
|
};
|
610
631
|
showWordLength: {
|
@@ -612,43 +633,47 @@ declare const _default: import('vue').DefineComponent<{
|
|
612
633
|
default: boolean;
|
613
634
|
};
|
614
635
|
customTextPaste: {
|
615
|
-
type: import(
|
636
|
+
type: import('vue').PropType<(data: string) => void | Promise<void>>;
|
616
637
|
default: null;
|
617
638
|
};
|
618
639
|
customHtmlPaste: {
|
619
|
-
type: import(
|
640
|
+
type: import('vue').PropType<(elements: AlexElement[]) => void | Promise<void>>;
|
620
641
|
default: null;
|
621
642
|
};
|
622
643
|
customImagePaste: {
|
623
|
-
type: import(
|
644
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
624
645
|
default: null;
|
625
646
|
};
|
626
647
|
customVideoPaste: {
|
627
|
-
type: import(
|
648
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
628
649
|
default: null;
|
629
650
|
};
|
630
651
|
customFilePaste: {
|
631
|
-
type: import(
|
652
|
+
type: import('vue').PropType<(file: File) => void | Promise<void>>;
|
632
653
|
default: null;
|
633
654
|
};
|
634
655
|
menu: {
|
635
|
-
type: import(
|
656
|
+
type: import('vue').PropType<MenuConfigType>;
|
636
657
|
default: null;
|
637
658
|
};
|
638
659
|
pasteKeepMarks: {
|
639
|
-
type: import(
|
660
|
+
type: import('vue').PropType<(el: AlexElement) => ObjectType>;
|
640
661
|
default: null;
|
641
662
|
};
|
642
663
|
pasteKeepStyles: {
|
643
|
-
type: import(
|
664
|
+
type: import('vue').PropType<(el: AlexElement) => ObjectType>;
|
644
665
|
default: null;
|
645
666
|
};
|
646
667
|
customParseNode: {
|
647
|
-
type: import(
|
668
|
+
type: import('vue').PropType<(el: AlexElement) => AlexElement>;
|
648
669
|
default: null;
|
649
670
|
};
|
671
|
+
extraKeepTags: {
|
672
|
+
type: import('vue').PropType<string[]>;
|
673
|
+
default: () => never[];
|
674
|
+
};
|
650
675
|
renderRules: {
|
651
|
-
type: import(
|
676
|
+
type: import('vue').PropType<((el: AlexElement) => void)[]>;
|
652
677
|
default: () => never[];
|
653
678
|
};
|
654
679
|
autoheight: {
|
@@ -660,7 +685,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
660
685
|
default: boolean;
|
661
686
|
};
|
662
687
|
plugins: {
|
663
|
-
type: import(
|
688
|
+
type: import('vue').PropType<import('../core/tool').PluginType[]>;
|
664
689
|
default: () => never[];
|
665
690
|
};
|
666
691
|
}>> & {
|
@@ -682,7 +707,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
682
707
|
placeholder: string;
|
683
708
|
autoheight: boolean;
|
684
709
|
toolbar: ToolbarConfigType;
|
685
|
-
locale: import(
|
710
|
+
locale: import('../locale').LocaleType;
|
686
711
|
autofocus: boolean;
|
687
712
|
allowCopy: boolean;
|
688
713
|
allowPaste: boolean;
|
@@ -695,11 +720,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
695
720
|
customImagePaste: (file: File) => void | Promise<void>;
|
696
721
|
customVideoPaste: (file: File) => void | Promise<void>;
|
697
722
|
customFilePaste: (file: File) => void | Promise<void>;
|
698
|
-
pasteKeepMarks: ObjectType;
|
699
|
-
pasteKeepStyles: ObjectType;
|
723
|
+
pasteKeepMarks: (el: AlexElement) => ObjectType;
|
724
|
+
pasteKeepStyles: (el: AlexElement) => ObjectType;
|
700
725
|
customParseNode: (el: AlexElement) => AlexElement;
|
726
|
+
extraKeepTags: string[];
|
701
727
|
renderRules: ((el: AlexElement) => void)[];
|
702
728
|
tab: boolean;
|
703
|
-
plugins: import(
|
729
|
+
plugins: import('../core/tool').PluginType[];
|
704
730
|
}, {}>;
|
705
731
|
export default _default;
|
package/lib/editify/props.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { LocaleType } from '../locale';
|
2
|
-
import { AlexElement } from 'alex-editor';
|
3
|
-
import { PluginType, MenuConfigType, ObjectType, ToolbarConfigType } from '../core/tool';
|
4
1
|
import { ExtractPublicPropTypes, PropType } from 'vue';
|
2
|
+
import { PluginType, MenuConfigType, ObjectType, ToolbarConfigType } from '../core/tool';
|
3
|
+
import { AlexElement } from 'alex-editor';
|
4
|
+
import { LocaleType } from '../locale';
|
5
5
|
|
6
6
|
export type EditifyTableColumnResizeParamsType = {
|
7
7
|
element: AlexElement | null;
|
@@ -95,17 +95,21 @@ export declare const EditifyProps: {
|
|
95
95
|
default: null;
|
96
96
|
};
|
97
97
|
pasteKeepMarks: {
|
98
|
-
type: PropType<ObjectType>;
|
98
|
+
type: PropType<(el: AlexElement) => ObjectType>;
|
99
99
|
default: null;
|
100
100
|
};
|
101
101
|
pasteKeepStyles: {
|
102
|
-
type: PropType<ObjectType>;
|
102
|
+
type: PropType<(el: AlexElement) => ObjectType>;
|
103
103
|
default: null;
|
104
104
|
};
|
105
105
|
customParseNode: {
|
106
106
|
type: PropType<(el: AlexElement) => AlexElement>;
|
107
107
|
default: null;
|
108
108
|
};
|
109
|
+
extraKeepTags: {
|
110
|
+
type: PropType<string[]>;
|
111
|
+
default: () => never[];
|
112
|
+
};
|
109
113
|
renderRules: {
|
110
114
|
type: PropType<((el: AlexElement) => void)[]>;
|
111
115
|
default: () => never[];
|