@itshixun/qckeditor-vue2 1.0.0
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 +265 -0
- package/dist/index.css +4 -0
- package/dist/index.d.ts +369 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +509 -0
- package/dist/src/components/CKEditor.d.ts +74 -0
- package/dist/src/components/CKEditor.d.ts.map +1 -0
- package/dist/src/components/QCKClassic.d.ts +65 -0
- package/dist/src/components/QCKClassic.d.ts.map +1 -0
- package/dist/src/components/QCKContent.d.ts +54 -0
- package/dist/src/components/QCKContent.d.ts.map +1 -0
- package/dist/src/components/QCKEditorPro.d.ts +183 -0
- package/dist/src/components/QCKEditorPro.d.ts.map +1 -0
- package/dist/src/types.d.ts +21 -0
- package/dist/src/types.d.ts.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ClassicEditor, EditorConfig } from 'ckeditor5';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{
|
|
4
|
+
value: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
config: {
|
|
13
|
+
type: PropType<EditorConfig>;
|
|
14
|
+
default: () => {};
|
|
15
|
+
};
|
|
16
|
+
tagName: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
disabled: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
disableTwoWayDataBinding: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
}, {
|
|
29
|
+
ClassicEditor: typeof ClassicEditor;
|
|
30
|
+
ckeditorRef: any;
|
|
31
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("ready" | "destroy" | "blur" | "focus" | "input" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
|
|
32
|
+
value: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
config: {
|
|
41
|
+
type: PropType<EditorConfig>;
|
|
42
|
+
default: () => {};
|
|
43
|
+
};
|
|
44
|
+
tagName: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
disabled: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
disableTwoWayDataBinding: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
}>>, {
|
|
57
|
+
value: string;
|
|
58
|
+
config: EditorConfig;
|
|
59
|
+
tagName: string;
|
|
60
|
+
disabled: boolean;
|
|
61
|
+
disableTwoWayDataBinding: boolean;
|
|
62
|
+
modelValue: string;
|
|
63
|
+
}>;
|
|
64
|
+
export default _default;
|
|
65
|
+
//# sourceMappingURL=QCKClassic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QCKClassic.d.ts","sourceRoot":"","sources":["../../../src/components/QCKClassic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAkB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAI7E,OAAO,yBAAyB,CAAC;;;;;;;;;;;cAqBX,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAtB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAjB5C,wBAsEG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
|
+
value: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
content: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
containerClass: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
sanitize: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
container: import('vue').Ref<HTMLDivElement | null>;
|
|
24
|
+
renderHtml: import('vue').ComputedRef<string>;
|
|
25
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{
|
|
26
|
+
value: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
modelValue: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
content: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
containerClass: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
sanitize: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
}>>, {
|
|
47
|
+
value: string;
|
|
48
|
+
modelValue: string;
|
|
49
|
+
content: string;
|
|
50
|
+
containerClass: string;
|
|
51
|
+
sanitize: boolean;
|
|
52
|
+
}>;
|
|
53
|
+
export default _default;
|
|
54
|
+
//# sourceMappingURL=QCKContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QCKContent.d.ts","sourceRoot":"","sources":["../../../src/components/QCKContent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjC,wBAgJG"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5';
|
|
3
|
+
import { ExtractEditorType } from '../types';
|
|
4
|
+
type ClassicEditorType = ExtractEditorType<typeof ClassicEditor>;
|
|
5
|
+
declare const _default: import('vue').DefineComponent<{
|
|
6
|
+
value: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
config: {
|
|
15
|
+
type: PropType<EditorConfig>;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
18
|
+
tagName: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
disabled: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
disableTwoWayDataBinding: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
content: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
containerClass: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
sanitize: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
placeholder: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
minHeight: {
|
|
47
|
+
type: NumberConstructor;
|
|
48
|
+
default: number;
|
|
49
|
+
};
|
|
50
|
+
height: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: number;
|
|
53
|
+
};
|
|
54
|
+
fitHeight: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
contentBgColor: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
contentBgHoverColor: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
borderRadius: {
|
|
67
|
+
type: NumberConstructor;
|
|
68
|
+
default: number;
|
|
69
|
+
};
|
|
70
|
+
}, {
|
|
71
|
+
currentValue: import('vue').Ref<string>;
|
|
72
|
+
isActive: import('vue').Ref<boolean>;
|
|
73
|
+
editorReady: import('vue').Ref<boolean>;
|
|
74
|
+
container: import('vue').Ref<HTMLElement | null>;
|
|
75
|
+
classicRef: any;
|
|
76
|
+
editorInstance: import('vue').Ref<ClassicEditor | null> | import('vue').ShallowRef<ClassicEditor | null>;
|
|
77
|
+
mouseDownFromThisEditor: import('vue').Ref<boolean>;
|
|
78
|
+
isDeactivating: import('vue').Ref<boolean>;
|
|
79
|
+
focusTimer: import('vue').Ref<number | null>;
|
|
80
|
+
previewHtml: import('vue').ComputedRef<string>;
|
|
81
|
+
wrapperStyle: import('vue').ComputedRef<{
|
|
82
|
+
minHeight: string;
|
|
83
|
+
height: string;
|
|
84
|
+
overflowY: "auto" | "hidden";
|
|
85
|
+
}>;
|
|
86
|
+
contentProps: import('vue').ComputedRef<{
|
|
87
|
+
containerClass: string;
|
|
88
|
+
sanitize: boolean;
|
|
89
|
+
}>;
|
|
90
|
+
shouldApplyMinHeight: import('vue').ComputedRef<boolean>;
|
|
91
|
+
activate: () => void;
|
|
92
|
+
handleGlobalActivate: (event: Event) => void;
|
|
93
|
+
deactivate: () => Promise<void>;
|
|
94
|
+
handleMouseDown: (event: MouseEvent) => void;
|
|
95
|
+
handleClickOutside: (event: MouseEvent) => void;
|
|
96
|
+
handleReady: (editor: ClassicEditorType) => void;
|
|
97
|
+
handleDestroy: () => void;
|
|
98
|
+
handleInput: (data: string, event: EventInfo, editor: ClassicEditorType) => void;
|
|
99
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("ready" | "destroy" | "blur" | "focus" | "input" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
|
|
100
|
+
value: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
default: string;
|
|
103
|
+
};
|
|
104
|
+
modelValue: {
|
|
105
|
+
type: StringConstructor;
|
|
106
|
+
default: string;
|
|
107
|
+
};
|
|
108
|
+
config: {
|
|
109
|
+
type: PropType<EditorConfig>;
|
|
110
|
+
default: () => {};
|
|
111
|
+
};
|
|
112
|
+
tagName: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
disabled: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
default: boolean;
|
|
119
|
+
};
|
|
120
|
+
disableTwoWayDataBinding: {
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
default: boolean;
|
|
123
|
+
};
|
|
124
|
+
content: {
|
|
125
|
+
type: StringConstructor;
|
|
126
|
+
default: undefined;
|
|
127
|
+
};
|
|
128
|
+
containerClass: {
|
|
129
|
+
type: StringConstructor;
|
|
130
|
+
default: string;
|
|
131
|
+
};
|
|
132
|
+
sanitize: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: boolean;
|
|
135
|
+
};
|
|
136
|
+
placeholder: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
default: string;
|
|
139
|
+
};
|
|
140
|
+
minHeight: {
|
|
141
|
+
type: NumberConstructor;
|
|
142
|
+
default: number;
|
|
143
|
+
};
|
|
144
|
+
height: {
|
|
145
|
+
type: NumberConstructor;
|
|
146
|
+
default: number;
|
|
147
|
+
};
|
|
148
|
+
fitHeight: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
152
|
+
contentBgColor: {
|
|
153
|
+
type: StringConstructor;
|
|
154
|
+
default: string;
|
|
155
|
+
};
|
|
156
|
+
contentBgHoverColor: {
|
|
157
|
+
type: StringConstructor;
|
|
158
|
+
default: string;
|
|
159
|
+
};
|
|
160
|
+
borderRadius: {
|
|
161
|
+
type: NumberConstructor;
|
|
162
|
+
default: number;
|
|
163
|
+
};
|
|
164
|
+
}>>, {
|
|
165
|
+
value: string;
|
|
166
|
+
config: EditorConfig;
|
|
167
|
+
tagName: string;
|
|
168
|
+
disabled: boolean;
|
|
169
|
+
disableTwoWayDataBinding: boolean;
|
|
170
|
+
modelValue: string;
|
|
171
|
+
content: string;
|
|
172
|
+
containerClass: string;
|
|
173
|
+
sanitize: boolean;
|
|
174
|
+
placeholder: string;
|
|
175
|
+
minHeight: number;
|
|
176
|
+
height: number;
|
|
177
|
+
fitHeight: boolean;
|
|
178
|
+
contentBgColor: string;
|
|
179
|
+
contentBgHoverColor: string;
|
|
180
|
+
borderRadius: number;
|
|
181
|
+
}>;
|
|
182
|
+
export default _default;
|
|
183
|
+
//# sourceMappingURL=QCKEditorPro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QCKEditorPro.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditorPro.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAuD,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAC;;;;;;;;;;;cAoB3C,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA8Ea,MAAM,GAAG,QAAQ;;;;;;;;kCAuBjC,KAAK;;6BA2CV,UAAU;gCAsBP,UAAU;0BA4BhB,iBAAiB;;wBAwBnB,MAAM,SAAS,SAAS,UAAU,iBAAiB;;;;;;;;;;;cA1N5D,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlB5C,wBA4UG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EditorConfig } from 'ckeditor5';
|
|
2
|
+
/**
|
|
3
|
+
* This file contains types for the CKEditor 5 Vue2 component.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The props accepted by the `<ckeditor>` component.
|
|
7
|
+
*/
|
|
8
|
+
export interface Props<TEditor> {
|
|
9
|
+
editor: TEditor;
|
|
10
|
+
config?: EditorConfig;
|
|
11
|
+
tagName?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
disableTwoWayDataBinding?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The editor type extracted from the editor instance type.
|
|
17
|
+
*/
|
|
18
|
+
export type ExtractEditorType<TEditor> = TEditor extends {
|
|
19
|
+
create(...args: Array<any>): Promise<infer E>;
|
|
20
|
+
} ? E : never;
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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;AAE9C;;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;CACpC;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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@itshixun/qckeditor-vue2",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vue2 components for CKEditor 5",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build:lib": "vue-tsc && vite build",
|
|
17
|
+
"dev:lib": "vite build --watch",
|
|
18
|
+
"release": "pnpm build:lib && npm publish --access public"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"vue": "^2.6.0 || ^2.7.0",
|
|
22
|
+
"ckeditor5": ">=42.0.0"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@ckeditor/ckeditor5-vue": "^7.4.0",
|
|
26
|
+
"lodash-es": "^4.17.21"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/lodash-es": "^4.17.12",
|
|
30
|
+
"@vitejs/plugin-vue2": "^2.3.3",
|
|
31
|
+
"@vue/composition-api": "^1.7.2",
|
|
32
|
+
"typescript": "^5.7.3",
|
|
33
|
+
"vite": "^6.0.0",
|
|
34
|
+
"vite-plugin-dts": "^4.5.4",
|
|
35
|
+
"vue": "^2.7.16",
|
|
36
|
+
"vue-tsc": "^2.0.0",
|
|
37
|
+
"ckeditor5": "^47.6.1"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"ckeditor",
|
|
41
|
+
"ckeditor5",
|
|
42
|
+
"vue",
|
|
43
|
+
"vue2",
|
|
44
|
+
"editor",
|
|
45
|
+
"rich-text",
|
|
46
|
+
"wysiwyg"
|
|
47
|
+
],
|
|
48
|
+
"author": "",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": ""
|
|
53
|
+
}
|
|
54
|
+
}
|