@itshixun/qckeditor-vue3 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 +191 -0
- package/dist/index.css +4 -0
- package/dist/index.d.ts +259 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +359 -0
- package/dist/src/components/CKEditor.vue.d.ts +30 -0
- package/dist/src/components/CKEditor.vue.d.ts.map +1 -0
- package/dist/src/components/QCKClassic.vue.d.ts +52 -0
- package/dist/src/components/QCKClassic.vue.d.ts.map +1 -0
- package/dist/src/components/QCKContent.vue.d.ts +21 -0
- package/dist/src/components/QCKContent.vue.d.ts.map +1 -0
- package/dist/src/components/QCKEditorPro.vue.d.ts +134 -0
- package/dist/src/components/QCKEditorPro.vue.d.ts.map +1 -0
- package/dist/src/types.d.ts +25 -0
- package/dist/src/types.d.ts.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { ClassicEditor, EditorConfig, EventInfo } from 'ckeditor5';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
config?: EditorConfig;
|
|
4
|
+
tagName?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
disableTwoWayDataBinding?: boolean;
|
|
7
|
+
content?: string;
|
|
8
|
+
containerClass?: string;
|
|
9
|
+
sanitize?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
minHeight?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
fitHeight?: boolean;
|
|
14
|
+
contentBgColor?: string;
|
|
15
|
+
contentBgHoverColor?: string;
|
|
16
|
+
borderRadius?: number;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = {
|
|
19
|
+
modelValue?: string;
|
|
20
|
+
} & __VLS_Props;
|
|
21
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (value: string) => any;
|
|
23
|
+
ready: (editor: ClassicEditor) => any;
|
|
24
|
+
destroy: () => any;
|
|
25
|
+
blur: (event: EventInfo<string, unknown>, editor: ClassicEditor) => any;
|
|
26
|
+
focus: (event: EventInfo<string, unknown>, editor: ClassicEditor) => any;
|
|
27
|
+
input: (data: string, event: EventInfo<string, unknown>, editor: ClassicEditor) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
30
|
+
onReady?: ((editor: ClassicEditor) => any) | undefined;
|
|
31
|
+
onDestroy?: (() => any) | undefined;
|
|
32
|
+
onBlur?: ((event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
33
|
+
onFocus?: ((event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
34
|
+
onInput?: ((data: string, event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
config: EditorConfig;
|
|
37
|
+
tagName: string;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
disableTwoWayDataBinding: boolean;
|
|
40
|
+
placeholder: string;
|
|
41
|
+
content: string;
|
|
42
|
+
containerClass: string;
|
|
43
|
+
sanitize: boolean;
|
|
44
|
+
minHeight: number;
|
|
45
|
+
height: number;
|
|
46
|
+
fitHeight: boolean;
|
|
47
|
+
contentBgColor: string;
|
|
48
|
+
contentBgHoverColor: string;
|
|
49
|
+
borderRadius: number;
|
|
50
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
51
|
+
container: HTMLDivElement;
|
|
52
|
+
classicRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
53
|
+
modelValue?: string;
|
|
54
|
+
} & {
|
|
55
|
+
config?: EditorConfig;
|
|
56
|
+
tagName?: string;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
disableTwoWayDataBinding?: boolean;
|
|
59
|
+
}> & Readonly<{
|
|
60
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
61
|
+
onReady?: ((editor: ClassicEditor) => any) | undefined;
|
|
62
|
+
onDestroy?: (() => any) | undefined;
|
|
63
|
+
onBlur?: ((event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
64
|
+
onFocus?: ((event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
65
|
+
onInput?: ((data: string, event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
66
|
+
}>, {
|
|
67
|
+
ckeditorRef: import('vue').Ref<{
|
|
68
|
+
instance: ClassicEditor | undefined;
|
|
69
|
+
lastEditorData: string | undefined;
|
|
70
|
+
} | null, {
|
|
71
|
+
instance: import('vue').Ref<ClassicEditor | undefined>;
|
|
72
|
+
lastEditorData: import('vue').Ref<string | undefined>;
|
|
73
|
+
} | {
|
|
74
|
+
instance: ClassicEditor | undefined;
|
|
75
|
+
lastEditorData: string | undefined;
|
|
76
|
+
} | null>;
|
|
77
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
78
|
+
"update:modelValue": (value: string) => any;
|
|
79
|
+
ready: (editor: ClassicEditor) => any;
|
|
80
|
+
destroy: () => any;
|
|
81
|
+
blur: (event: EventInfo<string, unknown>, editor: ClassicEditor) => any;
|
|
82
|
+
focus: (event: EventInfo<string, unknown>, editor: ClassicEditor) => any;
|
|
83
|
+
input: (data: string, event: EventInfo<string, unknown>, editor: ClassicEditor) => any;
|
|
84
|
+
}, import('vue').PublicProps, {
|
|
85
|
+
config: EditorConfig;
|
|
86
|
+
tagName: string;
|
|
87
|
+
disabled: boolean;
|
|
88
|
+
disableTwoWayDataBinding: boolean;
|
|
89
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
90
|
+
ckeditorRef: import('vue').ShallowUnwrapRef<{
|
|
91
|
+
instance: import('vue').Ref<ClassicEditor | undefined, ClassicEditor | undefined>;
|
|
92
|
+
lastEditorData: import('vue').Ref<string | undefined, string | undefined>;
|
|
93
|
+
}> | null;
|
|
94
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
95
|
+
P: {};
|
|
96
|
+
B: {};
|
|
97
|
+
D: {};
|
|
98
|
+
C: {};
|
|
99
|
+
M: {};
|
|
100
|
+
Defaults: {};
|
|
101
|
+
}, Readonly<{
|
|
102
|
+
modelValue?: string;
|
|
103
|
+
} & {
|
|
104
|
+
config?: EditorConfig;
|
|
105
|
+
tagName?: string;
|
|
106
|
+
disabled?: boolean;
|
|
107
|
+
disableTwoWayDataBinding?: boolean;
|
|
108
|
+
}> & Readonly<{
|
|
109
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
110
|
+
onReady?: ((editor: ClassicEditor) => any) | undefined;
|
|
111
|
+
onDestroy?: (() => any) | undefined;
|
|
112
|
+
onBlur?: ((event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
113
|
+
onFocus?: ((event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
114
|
+
onInput?: ((data: string, event: EventInfo<string, unknown>, editor: ClassicEditor) => any) | undefined;
|
|
115
|
+
}>, {
|
|
116
|
+
ckeditorRef: import('vue').Ref<{
|
|
117
|
+
instance: ClassicEditor | undefined;
|
|
118
|
+
lastEditorData: string | undefined;
|
|
119
|
+
} | null, {
|
|
120
|
+
instance: import('vue').Ref<ClassicEditor | undefined>;
|
|
121
|
+
lastEditorData: import('vue').Ref<string | undefined>;
|
|
122
|
+
} | {
|
|
123
|
+
instance: ClassicEditor | undefined;
|
|
124
|
+
lastEditorData: string | undefined;
|
|
125
|
+
} | null>;
|
|
126
|
+
}, {}, {}, {}, {
|
|
127
|
+
config: EditorConfig;
|
|
128
|
+
tagName: string;
|
|
129
|
+
disabled: boolean;
|
|
130
|
+
disableTwoWayDataBinding: boolean;
|
|
131
|
+
}> | null;
|
|
132
|
+
}, HTMLDivElement>;
|
|
133
|
+
export default _default;
|
|
134
|
+
//# sourceMappingURL=QCKEditorPro.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QCKEditorPro.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QCKEditorPro.vue"],"names":[],"mappings":"AAwCA;AA2VA,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAa7E,KAAK,WAAW,GAAG;IACf,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAiPJ,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;YAjQH,YAAY;aACX,MAAM;cACL,OAAO;8BACS,OAAO;iBAIpB,MAAM;aAHV,MAAM;oBACC,MAAM;cACZ,OAAO;eAEN,MAAM;YACT,MAAM;eACH,OAAO;oBACF,MAAM;yBACD,MAAM;kBACb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmYzB,wBAUG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EditorConfig } from 'ckeditor5';
|
|
2
|
+
/**
|
|
3
|
+
* This file contains types for the CKEditor 5 Vue component.
|
|
4
|
+
* These types were moved to a separate file, because the `vue-tsc`
|
|
5
|
+
* package couldn't generate the correct types for the component
|
|
6
|
+
* when the types were in the component file. This is a workaround
|
|
7
|
+
* that may be fixed in the next versions of `vue-tsc`.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The props accepted by the `<ckeditor>` component.
|
|
11
|
+
*/
|
|
12
|
+
export interface Props<TEditor> {
|
|
13
|
+
editor: TEditor;
|
|
14
|
+
config?: EditorConfig;
|
|
15
|
+
tagName?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
disableTwoWayDataBinding?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The editor type extracted from the editor instance type.
|
|
21
|
+
*/
|
|
22
|
+
export type ExtractEditorType<TEditor> = TEditor extends {
|
|
23
|
+
create(...args: Array<any>): Promise<infer E>;
|
|
24
|
+
} ? E : never;
|
|
25
|
+
//# 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;;;;;;GAMG;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,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@itshixun/qckeditor-vue3",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vue3 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
|
+
"ckeditor5": ">=42.0.0",
|
|
22
|
+
"vue": "^3.0.0"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"lodash-es": "^4.17.21"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/lodash-es": "^4.17.12",
|
|
29
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
30
|
+
"ckeditor5": "^47.6.1",
|
|
31
|
+
"typescript": "^5.7.3",
|
|
32
|
+
"vite": "^6.0.0",
|
|
33
|
+
"vite-plugin-dts": "^4.5.4",
|
|
34
|
+
"vue": "^3.5.13",
|
|
35
|
+
"vue-tsc": "^2.0.0"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"ckeditor",
|
|
39
|
+
"ckeditor5",
|
|
40
|
+
"vue",
|
|
41
|
+
"vue3",
|
|
42
|
+
"editor",
|
|
43
|
+
"rich-text",
|
|
44
|
+
"wysiwyg"
|
|
45
|
+
],
|
|
46
|
+
"author": "",
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": ""
|
|
51
|
+
}
|
|
52
|
+
}
|