vue-editify 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -3
- package/examples/App.vue +62 -62
- package/examples/main.ts +4 -4
- package/lib/components/button/button.vue.d.ts +11 -11
- package/lib/components/checkbox/checkbox.vue.d.ts +8 -8
- package/lib/components/colors/colors.vue.d.ts +4 -4
- package/lib/components/icon/icon.vue.d.ts +1 -1
- package/lib/components/insertImage/insertImage.vue.d.ts +9 -9
- package/lib/components/insertLink/insertLink.vue.d.ts +2 -2
- package/lib/components/insertTable/insertTable.vue.d.ts +2 -2
- package/lib/components/insertVideo/insertVideo.vue.d.ts +9 -9
- package/lib/components/layer/layer.vue.d.ts +9 -9
- package/lib/components/menu/menu.vue.d.ts +4 -4
- package/lib/components/toolbar/toolbar.vue.d.ts +9 -9
- package/lib/components/tooltip/tooltip.vue.d.ts +1 -1
- package/lib/components/triangle/triangle.vue.d.ts +4 -4
- package/lib/editify/editify.vue.d.ts +68 -68
- package/lib/editify.es.js +35 -24
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +45 -45
- package/src/components/button/button.less +145 -145
- package/src/components/button/button.vue +197 -197
- package/src/components/button/props.ts +95 -95
- package/src/components/checkbox/checkbox.less +84 -84
- package/src/components/checkbox/checkbox.vue +68 -68
- package/src/components/checkbox/props.ts +49 -49
- package/src/components/colors/colors.less +75 -75
- package/src/components/colors/colors.vue +36 -36
- package/src/components/colors/props.ts +29 -29
- package/src/components/icon/icon.less +14 -14
- package/src/components/icon/icon.vue +12 -12
- package/src/components/icon/props.ts +11 -11
- package/src/components/insertImage/insertImage.less +135 -135
- package/src/components/insertImage/insertImage.vue +146 -146
- package/src/components/insertImage/props.ts +43 -43
- package/src/components/insertLink/insertLink.less +64 -64
- package/src/components/insertLink/insertLink.vue +58 -58
- package/src/components/insertLink/props.ts +16 -16
- package/src/components/insertTable/insertTable.less +54 -54
- package/src/components/insertTable/insertTable.vue +85 -85
- package/src/components/insertTable/props.ts +27 -27
- package/src/components/insertVideo/insertVideo.less +135 -135
- package/src/components/insertVideo/insertVideo.vue +146 -146
- package/src/components/insertVideo/props.ts +43 -43
- package/src/components/layer/layer.less +49 -49
- package/src/components/layer/layer.vue +598 -598
- package/src/components/layer/props.ts +71 -71
- package/src/components/menu/menu.less +63 -63
- package/src/components/menu/menu.vue +1569 -1569
- package/src/components/menu/props.ts +17 -17
- package/src/components/toolbar/props.ts +35 -35
- package/src/components/toolbar/toolbar.less +89 -89
- package/src/components/toolbar/toolbar.vue +1101 -1101
- package/src/components/tooltip/props.ts +21 -21
- package/src/components/tooltip/tooltip.less +23 -23
- package/src/components/tooltip/tooltip.vue +37 -37
- package/src/components/triangle/props.ts +26 -26
- package/src/components/triangle/triangle.less +79 -79
- package/src/components/triangle/triangle.vue +65 -65
- package/src/core/function.ts +1150 -1144
- package/src/core/rule.ts +259 -259
- package/src/core/tool.ts +1137 -1137
- package/src/css/base.less +30 -30
- package/src/css/hljs.less +54 -54
- package/src/editify/editify.less +404 -404
- package/src/editify/editify.vue +810 -803
- package/src/editify/props.ts +156 -156
- package/src/hljs/index.ts +197 -197
- package/src/icon/iconfont.css +219 -219
- package/src/index.ts +32 -32
- package/src/locale/en_US.ts +88 -88
- package/src/locale/index.ts +12 -12
- package/src/locale/zh_CN.ts +88 -88
- package/tsconfig.json +27 -27
- package/tsconfig.node.json +11 -11
- package/vite-env.d.ts +1 -1
- package/vite.config.ts +42 -42
@@ -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
|
}, {}>;
|
@@ -3,7 +3,7 @@ import { AlexElement, AlexElementsRangeType } from 'alex-editor';
|
|
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: {
|
@@ -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,43 @@ 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<ObjectType>;
|
88
88
|
default: null;
|
89
89
|
};
|
90
90
|
pasteKeepStyles: {
|
91
|
-
type: import(
|
91
|
+
type: import("vue").PropType<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
98
|
renderRules: {
|
99
|
-
type: import(
|
99
|
+
type: import("vue").PropType<((el: AlexElement) => void)[]>;
|
100
100
|
default: () => never[];
|
101
101
|
};
|
102
102
|
autoheight: {
|
@@ -108,7 +108,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
108
108
|
default: boolean;
|
109
109
|
};
|
110
110
|
}, {
|
111
|
-
editor: import(
|
111
|
+
editor: import("vue").Ref<{
|
112
112
|
$el: HTMLElement;
|
113
113
|
disabled: boolean;
|
114
114
|
value: string;
|
@@ -129,10 +129,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
129
129
|
records: {
|
130
130
|
stack: {
|
131
131
|
key: number;
|
132
|
-
type: import(
|
132
|
+
type: import("alex-editor").AlexElementType;
|
133
133
|
parsedom: string | null;
|
134
|
-
marks: import(
|
135
|
-
styles: import(
|
134
|
+
marks: import("alex-editor/lib/core/tool").ObjectType | null;
|
135
|
+
styles: import("alex-editor/lib/core/tool").ObjectType | null;
|
136
136
|
textContent: string | null;
|
137
137
|
children: any[] | null;
|
138
138
|
parent: any | null;
|
@@ -172,10 +172,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
172
172
|
anchor: {
|
173
173
|
element: {
|
174
174
|
key: number;
|
175
|
-
type: import(
|
175
|
+
type: import("alex-editor").AlexElementType;
|
176
176
|
parsedom: string | null;
|
177
|
-
marks: import(
|
178
|
-
styles: import(
|
177
|
+
marks: import("alex-editor/lib/core/tool").ObjectType | null;
|
178
|
+
styles: import("alex-editor/lib/core/tool").ObjectType | null;
|
179
179
|
textContent: string | null;
|
180
180
|
children: any[] | null;
|
181
181
|
parent: any | null;
|
@@ -212,17 +212,17 @@ declare const _default: import('vue').DefineComponent<{
|
|
212
212
|
__fullClone: () => AlexElement;
|
213
213
|
};
|
214
214
|
offset: number;
|
215
|
-
isEqual: (point: import(
|
215
|
+
isEqual: (point: import("alex-editor").AlexPoint) => boolean;
|
216
216
|
moveToEnd: (element: AlexElement) => void;
|
217
217
|
moveToStart: (element: AlexElement) => void;
|
218
218
|
};
|
219
219
|
focus: {
|
220
220
|
element: {
|
221
221
|
key: number;
|
222
|
-
type: import(
|
222
|
+
type: import("alex-editor").AlexElementType;
|
223
223
|
parsedom: string | null;
|
224
|
-
marks: import(
|
225
|
-
styles: import(
|
224
|
+
marks: import("alex-editor/lib/core/tool").ObjectType | null;
|
225
|
+
styles: import("alex-editor/lib/core/tool").ObjectType | null;
|
226
226
|
textContent: string | null;
|
227
227
|
children: any[] | null;
|
228
228
|
parent: any | null;
|
@@ -259,24 +259,24 @@ declare const _default: import('vue').DefineComponent<{
|
|
259
259
|
__fullClone: () => AlexElement;
|
260
260
|
};
|
261
261
|
offset: number;
|
262
|
-
isEqual: (point: import(
|
262
|
+
isEqual: (point: import("alex-editor").AlexPoint) => boolean;
|
263
263
|
moveToEnd: (element: AlexElement) => void;
|
264
264
|
moveToStart: (element: AlexElement) => void;
|
265
265
|
};
|
266
266
|
} | null;
|
267
267
|
}[];
|
268
268
|
current: number;
|
269
|
-
push: (stack: AlexElement[], range?: import(
|
270
|
-
get: (type: 1 | -1) => import(
|
271
|
-
updateCurrentRange: (range: import(
|
272
|
-
__cloneRange: (newStack: AlexElement[], range?: import(
|
269
|
+
push: (stack: AlexElement[], range?: import("alex-editor").AlexRange | null | undefined) => void;
|
270
|
+
get: (type: 1 | -1) => import("alex-editor").AlexHistoryResultType | null;
|
271
|
+
updateCurrentRange: (range: import("alex-editor").AlexRange) => void;
|
272
|
+
__cloneRange: (newStack: AlexElement[], range?: import("alex-editor").AlexRange | null | undefined) => import("alex-editor").AlexRange | null;
|
273
273
|
};
|
274
274
|
stack: {
|
275
275
|
key: number;
|
276
|
-
type: import(
|
276
|
+
type: import("alex-editor").AlexElementType;
|
277
277
|
parsedom: string | null;
|
278
|
-
marks: import(
|
279
|
-
styles: import(
|
278
|
+
marks: import("alex-editor/lib/core/tool").ObjectType | null;
|
279
|
+
styles: import("alex-editor/lib/core/tool").ObjectType | null;
|
280
280
|
textContent: string | null;
|
281
281
|
children: any[] | null;
|
282
282
|
parent: any | null;
|
@@ -316,10 +316,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
316
316
|
anchor: {
|
317
317
|
element: {
|
318
318
|
key: number;
|
319
|
-
type: import(
|
319
|
+
type: import("alex-editor").AlexElementType;
|
320
320
|
parsedom: string | null;
|
321
|
-
marks: import(
|
322
|
-
styles: import(
|
321
|
+
marks: import("alex-editor/lib/core/tool").ObjectType | null;
|
322
|
+
styles: import("alex-editor/lib/core/tool").ObjectType | null;
|
323
323
|
textContent: string | null;
|
324
324
|
children: any[] | null;
|
325
325
|
parent: any | null;
|
@@ -356,17 +356,17 @@ declare const _default: import('vue').DefineComponent<{
|
|
356
356
|
__fullClone: () => AlexElement;
|
357
357
|
};
|
358
358
|
offset: number;
|
359
|
-
isEqual: (point: import(
|
359
|
+
isEqual: (point: import("alex-editor").AlexPoint) => boolean;
|
360
360
|
moveToEnd: (element: AlexElement) => void;
|
361
361
|
moveToStart: (element: AlexElement) => void;
|
362
362
|
};
|
363
363
|
focus: {
|
364
364
|
element: {
|
365
365
|
key: number;
|
366
|
-
type: import(
|
366
|
+
type: import("alex-editor").AlexElementType;
|
367
367
|
parsedom: string | null;
|
368
|
-
marks: import(
|
369
|
-
styles: import(
|
368
|
+
marks: import("alex-editor/lib/core/tool").ObjectType | null;
|
369
|
+
styles: import("alex-editor/lib/core/tool").ObjectType | null;
|
370
370
|
textContent: string | null;
|
371
371
|
children: any[] | null;
|
372
372
|
parent: any | null;
|
@@ -403,13 +403,13 @@ declare const _default: import('vue').DefineComponent<{
|
|
403
403
|
__fullClone: () => AlexElement;
|
404
404
|
};
|
405
405
|
offset: number;
|
406
|
-
isEqual: (point: import(
|
406
|
+
isEqual: (point: import("alex-editor").AlexPoint) => boolean;
|
407
407
|
moveToEnd: (element: AlexElement) => void;
|
408
408
|
moveToStart: (element: AlexElement) => void;
|
409
409
|
};
|
410
410
|
} | null;
|
411
411
|
__guid: number;
|
412
|
-
__events: import(
|
412
|
+
__events: import("alex-editor/lib/core/tool").ObjectType;
|
413
413
|
__firstRender: boolean;
|
414
414
|
__isInputChinese: boolean;
|
415
415
|
__innerSelectionChange: boolean;
|
@@ -436,8 +436,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
436
436
|
getElementByKey: (key: number) => AlexElement | null;
|
437
437
|
getPreviousElement: (ele: AlexElement) => AlexElement | null;
|
438
438
|
getNextElement: (ele: AlexElement) => AlexElement | null;
|
439
|
-
getPreviousElementOfPoint: (point: import(
|
440
|
-
getNextElementOfPoint: (point: import(
|
439
|
+
getPreviousElementOfPoint: (point: import("alex-editor").AlexPoint) => AlexElement | null;
|
440
|
+
getNextElementOfPoint: (point: import("alex-editor").AlexPoint) => AlexElement | null;
|
441
441
|
getElementsByRange: () => AlexElementsRangeType;
|
442
442
|
addElementTo: (childEle: AlexElement, parentEle: AlexElement, index?: number | undefined) => void;
|
443
443
|
addElementBefore: (newEle: AlexElement, targetEle: AlexElement) => void;
|
@@ -450,17 +450,17 @@ declare const _default: import('vue').DefineComponent<{
|
|
450
450
|
on: (eventName: string, eventHandle: (...args: any) => void) => void;
|
451
451
|
destroy: () => void;
|
452
452
|
} | null>;
|
453
|
-
isSourceView: import(
|
454
|
-
isFullScreen: import(
|
455
|
-
canUseMenu: import(
|
456
|
-
dataRangeCaches: import(
|
453
|
+
isSourceView: import("vue").Ref<boolean>;
|
454
|
+
isFullScreen: import("vue").Ref<boolean>;
|
455
|
+
canUseMenu: import("vue").Ref<boolean>;
|
456
|
+
dataRangeCaches: import("vue").Ref<{
|
457
457
|
list: {
|
458
458
|
element: {
|
459
459
|
key: number;
|
460
|
-
type: import(
|
460
|
+
type: import("alex-editor").AlexElementType;
|
461
461
|
parsedom: string | null;
|
462
|
-
marks: import(
|
463
|
-
styles: import(
|
462
|
+
marks: import("alex-editor/lib/core/tool").ObjectType | null;
|
463
|
+
styles: import("alex-editor/lib/core/tool").ObjectType | null;
|
464
464
|
textContent: string | null;
|
465
465
|
children: any[] | null;
|
466
466
|
parent: any | null;
|
@@ -501,10 +501,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
501
501
|
flatList: {
|
502
502
|
element: {
|
503
503
|
key: number;
|
504
|
-
type: import(
|
504
|
+
type: import("alex-editor").AlexElementType;
|
505
505
|
parsedom: string | null;
|
506
|
-
marks: import(
|
507
|
-
styles: import(
|
506
|
+
marks: import("alex-editor/lib/core/tool").ObjectType | null;
|
507
|
+
styles: import("alex-editor/lib/core/tool").ObjectType | null;
|
508
508
|
textContent: string | null;
|
509
509
|
children: any[] | null;
|
510
510
|
parent: any | null;
|
@@ -543,12 +543,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
543
543
|
offset: false | number[];
|
544
544
|
}[];
|
545
545
|
}>;
|
546
|
-
textValue: import(
|
546
|
+
textValue: import("vue").ComputedRef<string>;
|
547
547
|
collapseToEnd: () => void;
|
548
548
|
collapseToStart: () => void;
|
549
549
|
undo: () => void;
|
550
550
|
redo: () => void;
|
551
|
-
}, unknown, {}, {}, import(
|
551
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
552
552
|
"update:modelValue": (...args: any[]) => void;
|
553
553
|
change: (...args: any[]) => void;
|
554
554
|
blur: (...args: any[]) => void;
|
@@ -557,9 +557,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
557
557
|
insertparagraph: (...args: any[]) => void;
|
558
558
|
rangeupdate: (...args: any[]) => void;
|
559
559
|
updateview: (...args: any[]) => void;
|
560
|
-
}, string, import(
|
560
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
561
561
|
locale: {
|
562
|
-
type: import(
|
562
|
+
type: import("vue").PropType<import("../locale").LocaleType>;
|
563
563
|
default: string;
|
564
564
|
};
|
565
565
|
modelValue: {
|
@@ -608,7 +608,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
608
608
|
default: number;
|
609
609
|
};
|
610
610
|
toolbar: {
|
611
|
-
type: import(
|
611
|
+
type: import("vue").PropType<ToolbarConfigType>;
|
612
612
|
default: null;
|
613
613
|
};
|
614
614
|
showWordLength: {
|
@@ -616,43 +616,43 @@ declare const _default: import('vue').DefineComponent<{
|
|
616
616
|
default: boolean;
|
617
617
|
};
|
618
618
|
customTextPaste: {
|
619
|
-
type: import(
|
619
|
+
type: import("vue").PropType<(data: string) => void | Promise<void>>;
|
620
620
|
default: null;
|
621
621
|
};
|
622
622
|
customHtmlPaste: {
|
623
|
-
type: import(
|
623
|
+
type: import("vue").PropType<(elements: AlexElement[]) => void | Promise<void>>;
|
624
624
|
default: null;
|
625
625
|
};
|
626
626
|
customImagePaste: {
|
627
|
-
type: import(
|
627
|
+
type: import("vue").PropType<(file: File) => void | Promise<void>>;
|
628
628
|
default: null;
|
629
629
|
};
|
630
630
|
customVideoPaste: {
|
631
|
-
type: import(
|
631
|
+
type: import("vue").PropType<(file: File) => void | Promise<void>>;
|
632
632
|
default: null;
|
633
633
|
};
|
634
634
|
customFilePaste: {
|
635
|
-
type: import(
|
635
|
+
type: import("vue").PropType<(file: File) => void | Promise<void>>;
|
636
636
|
default: null;
|
637
637
|
};
|
638
638
|
menu: {
|
639
|
-
type: import(
|
639
|
+
type: import("vue").PropType<MenuConfigType>;
|
640
640
|
default: null;
|
641
641
|
};
|
642
642
|
pasteKeepMarks: {
|
643
|
-
type: import(
|
643
|
+
type: import("vue").PropType<ObjectType>;
|
644
644
|
default: null;
|
645
645
|
};
|
646
646
|
pasteKeepStyles: {
|
647
|
-
type: import(
|
647
|
+
type: import("vue").PropType<ObjectType>;
|
648
648
|
default: null;
|
649
649
|
};
|
650
650
|
customParseNode: {
|
651
|
-
type: import(
|
651
|
+
type: import("vue").PropType<(el: AlexElement) => AlexElement>;
|
652
652
|
default: null;
|
653
653
|
};
|
654
654
|
renderRules: {
|
655
|
-
type: import(
|
655
|
+
type: import("vue").PropType<((el: AlexElement) => void)[]>;
|
656
656
|
default: () => never[];
|
657
657
|
};
|
658
658
|
autoheight: {
|
@@ -681,7 +681,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
681
681
|
placeholder: string;
|
682
682
|
autoheight: boolean;
|
683
683
|
toolbar: ToolbarConfigType;
|
684
|
-
locale: import(
|
684
|
+
locale: import("../locale").LocaleType;
|
685
685
|
autofocus: boolean;
|
686
686
|
allowCopy: boolean;
|
687
687
|
allowPaste: boolean;
|
package/lib/editify.es.js
CHANGED
@@ -3539,7 +3539,7 @@ class AlexEditor {
|
|
3539
3539
|
this.insertElement(text);
|
3540
3540
|
this.range.anchor.moveToEnd(text);
|
3541
3541
|
this.range.focus.moveToEnd(text);
|
3542
|
-
this.emit("insertParagraph",
|
3542
|
+
this.emit("insertParagraph", inblock, inblock);
|
3543
3543
|
} else if (inblock.behavior == "block") {
|
3544
3544
|
if (this.range.anchor.offset == 0 && !(previousElement && inblock.isContains(previousElement))) {
|
3545
3545
|
const paragraph = inblock.clone(false);
|
@@ -3579,7 +3579,7 @@ class AlexEditor {
|
|
3579
3579
|
this.insertElement(text);
|
3580
3580
|
this.range.anchor.moveToEnd(text);
|
3581
3581
|
this.range.focus.moveToEnd(text);
|
3582
|
-
this.emit("insertParagraph",
|
3582
|
+
this.emit("insertParagraph", block, block);
|
3583
3583
|
} else {
|
3584
3584
|
if (this.range.anchor.offset == 0 && !(previousElement && block.isContains(previousElement))) {
|
3585
3585
|
const paragraph = block.clone(false);
|
@@ -18815,9 +18815,15 @@ const elementIsInTask = (element2) => {
|
|
18815
18815
|
return false;
|
18816
18816
|
};
|
18817
18817
|
const isList = function(element2, ordered = false) {
|
18818
|
+
if (element2.isEmpty()) {
|
18819
|
+
return false;
|
18820
|
+
}
|
18818
18821
|
return element2.parsedom == "div" && element2.hasMarks() && element2.marks["data-editify-list"] == (ordered ? "ol" : "ul");
|
18819
18822
|
};
|
18820
18823
|
const isTask = function(element2) {
|
18824
|
+
if (element2.isEmpty()) {
|
18825
|
+
return false;
|
18826
|
+
}
|
18821
18827
|
return element2.parsedom == "div" && element2.hasMarks() && element2.marks.hasOwnProperty("data-editify-task");
|
18822
18828
|
};
|
18823
18829
|
const hasPreInRange = (editor, dataRangeCaches) => {
|
@@ -20003,7 +20009,7 @@ const _export_sfc = (sfc, props) => {
|
|
20003
20009
|
}
|
20004
20010
|
return target;
|
20005
20011
|
};
|
20006
|
-
const Triangle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
20012
|
+
const Triangle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-e1abc967"]]);
|
20007
20013
|
const LayerProps = {
|
20008
20014
|
//是否显示
|
20009
20015
|
modelValue: {
|
@@ -20619,7 +20625,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
20619
20625
|
};
|
20620
20626
|
}
|
20621
20627
|
});
|
20622
|
-
const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
20628
|
+
const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-ac221d1e"]]);
|
20623
20629
|
const TooltipProps = {
|
20624
20630
|
//提示内容
|
20625
20631
|
content: {
|
@@ -20695,7 +20701,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
20695
20701
|
};
|
20696
20702
|
}
|
20697
20703
|
});
|
20698
|
-
const Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
20704
|
+
const Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-8372de0b"]]);
|
20699
20705
|
const IconProps = {
|
20700
20706
|
//图标值
|
20701
20707
|
value: {
|
@@ -20717,7 +20723,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
20717
20723
|
};
|
20718
20724
|
}
|
20719
20725
|
});
|
20720
|
-
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
20726
|
+
const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-6e00035b"]]);
|
20721
20727
|
const ButtonProps = {
|
20722
20728
|
//按钮类型
|
20723
20729
|
type: {
|
@@ -21029,7 +21035,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
21029
21035
|
};
|
21030
21036
|
}
|
21031
21037
|
});
|
21032
|
-
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
21038
|
+
const Button = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-b31edeb8"]]);
|
21033
21039
|
const CheckboxProps = {
|
21034
21040
|
//是否禁用
|
21035
21041
|
disabled: {
|
@@ -21158,7 +21164,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
21158
21164
|
};
|
21159
21165
|
}
|
21160
21166
|
});
|
21161
|
-
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
21167
|
+
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-09512b2d"]]);
|
21162
21168
|
const ColorsProps = {
|
21163
21169
|
//颜色数组
|
21164
21170
|
data: {
|
@@ -21235,7 +21241,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
21235
21241
|
};
|
21236
21242
|
}
|
21237
21243
|
});
|
21238
|
-
const Colors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
21244
|
+
const Colors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-e09149c7"]]);
|
21239
21245
|
const ToolbarProps = {
|
21240
21246
|
//是否显示
|
21241
21247
|
modelValue: {
|
@@ -22765,7 +22771,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
22765
22771
|
};
|
22766
22772
|
}
|
22767
22773
|
});
|
22768
|
-
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
22774
|
+
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-44b03ca9"]]);
|
22769
22775
|
const InsertLinkProps = {
|
22770
22776
|
//主题色
|
22771
22777
|
color: {
|
@@ -22868,7 +22874,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
22868
22874
|
};
|
22869
22875
|
}
|
22870
22876
|
});
|
22871
|
-
const InsertLink = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
22877
|
+
const InsertLink = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-f5a2ce93"]]);
|
22872
22878
|
const InsertImageProps = {
|
22873
22879
|
//主题色
|
22874
22880
|
color: {
|
@@ -23066,7 +23072,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
23066
23072
|
};
|
23067
23073
|
}
|
23068
23074
|
});
|
23069
|
-
const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
23075
|
+
const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-20eec429"]]);
|
23070
23076
|
const InsertVideoProps = {
|
23071
23077
|
//主题色
|
23072
23078
|
color: {
|
@@ -23264,7 +23270,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
23264
23270
|
};
|
23265
23271
|
}
|
23266
23272
|
});
|
23267
|
-
const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
23273
|
+
const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-d90909eb"]]);
|
23268
23274
|
const InsertTableProps = {
|
23269
23275
|
//主题色
|
23270
23276
|
color: {
|
@@ -23282,7 +23288,7 @@ const InsertTableProps = {
|
|
23282
23288
|
default: 10
|
23283
23289
|
}
|
23284
23290
|
};
|
23285
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
23291
|
+
const _withScopeId = (n) => (pushScopeId("data-v-961451b7"), n = n(), popScopeId(), n);
|
23286
23292
|
const _hoisted_1$2 = { class: "editify-table" };
|
23287
23293
|
const _hoisted_2$1 = ["onMouseenter", "onClick"];
|
23288
23294
|
const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, null, -1));
|
@@ -23373,7 +23379,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
23373
23379
|
};
|
23374
23380
|
}
|
23375
23381
|
});
|
23376
|
-
const InsertTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
23382
|
+
const InsertTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-961451b7"]]);
|
23377
23383
|
const MenuProps = {
|
23378
23384
|
//菜单栏配置
|
23379
23385
|
config: {
|
@@ -24715,7 +24721,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
24715
24721
|
};
|
24716
24722
|
}
|
24717
24723
|
});
|
24718
|
-
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
24724
|
+
const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-226bbacd"]]);
|
24719
24725
|
const EditifyProps = {
|
24720
24726
|
//国际化语言类型
|
24721
24727
|
locale: {
|
@@ -25506,12 +25512,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25506
25512
|
}, 0);
|
25507
25513
|
};
|
25508
25514
|
const handleInsertParagraph = (element2, previousElement) => {
|
25509
|
-
if (
|
25510
|
-
if (previousElement.
|
25511
|
-
|
25512
|
-
|
25513
|
-
|
25514
|
-
|
25515
|
+
if (!element2.isEqual(previousElement)) {
|
25516
|
+
if (previousElement.isOnlyHasBreak() && element2.isOnlyHasBreak()) {
|
25517
|
+
if (previousElement.parsedom != AlexElement.BLOCK_NODE) {
|
25518
|
+
elementToParagraph(previousElement);
|
25519
|
+
editor.value.range.anchor.moveToStart(previousElement);
|
25520
|
+
editor.value.range.focus.moveToStart(previousElement);
|
25521
|
+
element2.toEmpty();
|
25522
|
+
}
|
25523
|
+
}
|
25524
|
+
if (isTask(element2)) {
|
25525
|
+
element2.marks["data-editify-task"] = "uncheck";
|
25515
25526
|
}
|
25516
25527
|
}
|
25517
25528
|
emits("insertparagraph", value.value);
|
@@ -25738,8 +25749,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25738
25749
|
};
|
25739
25750
|
}
|
25740
25751
|
});
|
25741
|
-
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
25742
|
-
const version = "0.1.
|
25752
|
+
const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c794ee6c"]]);
|
25753
|
+
const version = "0.1.20";
|
25743
25754
|
const install = (app) => {
|
25744
25755
|
app.component(Editify.name, Editify);
|
25745
25756
|
};
|