@itshixun/qckeditor-vue2 1.1.4 → 1.1.6
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/README.md +105 -6
- package/dist/index.css +2 -2
- package/dist/index.d.ts +84 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1952 -1829
- package/dist/src/components/QCKClassic.d.ts +2 -5
- package/dist/src/components/QCKClassic.d.ts.map +1 -1
- package/dist/src/components/QCKContent.d.ts.map +1 -1
- package/dist/src/components/QCKEditor.d.ts +93 -0
- package/dist/src/components/QCKEditor.d.ts.map +1 -0
- package/dist/src/components/QCKEditorPro.d.ts.map +1 -1
- package/dist/src/types.d.ts +10 -1
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { EditorConfig } from 'ckeditor5';
|
|
3
3
|
declare const _default: import('vue').DefineComponent<{
|
|
4
4
|
value: {
|
|
5
5
|
type: StringConstructor;
|
|
@@ -29,10 +29,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
29
29
|
type: PropType<(data: string) => string>;
|
|
30
30
|
default: (data: string) => string;
|
|
31
31
|
};
|
|
32
|
-
}, {
|
|
33
|
-
ClassicEditor: typeof ClassicEditor;
|
|
34
|
-
ckeditorRef: any;
|
|
35
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
|
|
32
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
|
|
36
33
|
value: {
|
|
37
34
|
type: StringConstructor;
|
|
38
35
|
default: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCKClassic.d.ts","sourceRoot":"","sources":["../../../src/components/QCKClassic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"QCKClassic.d.ts","sourceRoot":"","sources":["../../../src/components/QCKClassic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;;cAuBvD,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;;;;;cAjBN,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;2BADY,MAAM,KAAK,MAAM;;;AAjCzD,wBAsEG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCKContent.d.ts","sourceRoot":"","sources":["../../../src/components/QCKContent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA0D,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE5F,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,uCAAuC,CAAC;AAK/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8EjC,QAAQ,CAAC,MAAM,CAAC;;;;cAIL,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"QCKContent.d.ts","sourceRoot":"","sources":["../../../src/components/QCKContent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA0D,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE5F,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,uCAAuC,CAAC;AAK/C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8EjC,QAAQ,CAAC,MAAM,CAAC;;;;cAIL,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;kCA+KlC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAnL7B,QAAQ,CAAC,MAAM,CAAC;;;;cAIL,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;AArC3E,wBAoUG"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ClassicEditor, InlineEditor, DecoupledEditor, EditorConfig } from 'ckeditor5';
|
|
3
|
+
import { QEditorInstance, QEditorType } from '../types';
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
5
|
+
/** 编辑器类型:classic / inline / document */
|
|
6
|
+
type: {
|
|
7
|
+
type: PropType<QEditorType>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
value: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
config: {
|
|
19
|
+
type: PropType<EditorConfig>;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
tagName: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
disabled: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
disableTwoWayDataBinding: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
dataNormalizer: {
|
|
35
|
+
type: PropType<(data: string) => string>;
|
|
36
|
+
default: (data: string) => string;
|
|
37
|
+
};
|
|
38
|
+
}, {
|
|
39
|
+
normalizedType: import('vue').ComputedRef<QEditorType>;
|
|
40
|
+
editorClass: import('vue').ComputedRef<typeof InlineEditor | typeof DecoupledEditor | typeof ClassicEditor>;
|
|
41
|
+
}, {}, {}, {
|
|
42
|
+
/**
|
|
43
|
+
* document 类型:DecoupledEditor 的 toolbar 不会自动挂载,
|
|
44
|
+
* create 完成后需手动挂到独立容器(官方推荐用法)。
|
|
45
|
+
* 注意通过 this.$refs 取 toolbar 容器(render 函数中 ref 注册到 $refs)。
|
|
46
|
+
*/
|
|
47
|
+
onEditorReady(editor: QEditorInstance): void;
|
|
48
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
|
|
49
|
+
/** 编辑器类型:classic / inline / document */
|
|
50
|
+
type: {
|
|
51
|
+
type: PropType<QEditorType>;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
value: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
modelValue: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
config: {
|
|
63
|
+
type: PropType<EditorConfig>;
|
|
64
|
+
default: () => {};
|
|
65
|
+
};
|
|
66
|
+
tagName: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
disabled: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
disableTwoWayDataBinding: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
dataNormalizer: {
|
|
79
|
+
type: PropType<(data: string) => string>;
|
|
80
|
+
default: (data: string) => string;
|
|
81
|
+
};
|
|
82
|
+
}>>, {
|
|
83
|
+
value: string;
|
|
84
|
+
config: EditorConfig;
|
|
85
|
+
tagName: string;
|
|
86
|
+
disabled: boolean;
|
|
87
|
+
disableTwoWayDataBinding: boolean;
|
|
88
|
+
dataNormalizer: (data: string) => string;
|
|
89
|
+
modelValue: string;
|
|
90
|
+
type: QEditorType;
|
|
91
|
+
}>;
|
|
92
|
+
export default _default;
|
|
93
|
+
//# sourceMappingURL=QCKEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QCKEditor.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA6B,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAkB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5G,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI7D,OAAO,yBAAyB,CAAC;;IAU7B,wCAAwC;;cAEtB,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;;;cAYrB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;IA4BxB;;;;OAIG;0BACmB,eAAe;;IAhErC,wCAAwC;;cAEtB,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;;;cAYrB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;2BADY,MAAM,KAAK,MAAM;;;;AAtCzD,wBAmIG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QCKEditorPro.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditorPro.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA8D,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAChG,OAAO,EAAE,aAAa,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAE1E,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAC;;;;;;;;;;;cAuB3C,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+CK,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;;;;mBA2DlB,MAAM,GAAG,QAAQ;;;;;;;;;;;kCA0BjC,KAAK;;
|
|
1
|
+
{"version":3,"file":"QCKEditorPro.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditorPro.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA8D,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAChG,OAAO,EAAE,aAAa,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG7F,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAE1E,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAC;;;;;;;;;;;cAuB3C,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+CK,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;;;;mBA2DlB,MAAM,GAAG,QAAQ;;;;;;;;;;;kCA0BjC,KAAK;;6BAkDV,UAAU;gCAsBP,UAAU;0BA4BhB,iBAAiB;;;;wBAyCnB,MAAM,SAAS,SAAS,UAAU,iBAAiB;;;;;;;;;;;cAlS5D,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+CK,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;2BAhDnC,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;AAlCzD,wBA4ZG"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorConfig } from 'ckeditor5';
|
|
1
|
+
import { ClassicEditor, DecoupledEditor, EditorConfig, InlineEditor } from 'ckeditor5';
|
|
2
2
|
/**
|
|
3
3
|
* This file contains types for the CKEditor 5 Vue2 component.
|
|
4
4
|
*/
|
|
@@ -34,4 +34,13 @@ export interface QCKImagePreviewOptions {
|
|
|
34
34
|
/** 是否显示全屏按钮,默认 true */
|
|
35
35
|
fullscreen?: boolean;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* QCKEditor 支持的编辑器类型。
|
|
39
|
+
* - classic:经典编辑器(工具栏固定顶部)
|
|
40
|
+
* - inline:行内编辑器(工具栏浮动,选中内容时显示)
|
|
41
|
+
* - document:文档编辑器(工具栏分离挂载,高度自适应容器)
|
|
42
|
+
*/
|
|
43
|
+
export type QEditorType = 'classic' | 'inline' | 'document';
|
|
44
|
+
/** QCKEditor 事件回调(ready/blur/focus/input)中的编辑器实例联合类型 */
|
|
45
|
+
export type QEditorInstance = ClassicEditor | InlineEditor | DecoupledEditor;
|
|
37
46
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5F;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,OAAO;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,IAAI,OAAO,SAAS;IAAE,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAEvH;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5D,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,YAAY,GAAG,eAAe,CAAC"}
|