@itshixun/qckeditor-vue2 1.1.8 → 1.2.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.
@@ -29,6 +29,11 @@ declare const _default: import('vue').DefineComponent<{
29
29
  type: PropType<(data: string) => string>;
30
30
  default: (data: string) => string;
31
31
  };
32
+ /** 容器高度 100% 充满父级:透传给 QCKEditor */
33
+ fitHeight: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
32
37
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
33
38
  value: {
34
39
  type: StringConstructor;
@@ -58,6 +63,11 @@ declare const _default: import('vue').DefineComponent<{
58
63
  type: PropType<(data: string) => string>;
59
64
  default: (data: string) => string;
60
65
  };
66
+ /** 容器高度 100% 充满父级:透传给 QCKEditor */
67
+ fitHeight: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
61
71
  }>>, {
62
72
  value: string;
63
73
  config: EditorConfig;
@@ -66,6 +76,7 @@ declare const _default: import('vue').DefineComponent<{
66
76
  disableTwoWayDataBinding: boolean;
67
77
  dataNormalizer: (data: string) => string;
68
78
  modelValue: string;
79
+ fitHeight: boolean;
69
80
  }>;
70
81
  export default _default;
71
82
  //# sourceMappingURL=QCKClassic.d.ts.map
@@ -1 +1 @@
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
+ {"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;;IAExB,mCAAmC;;;;;;;;;;;;;;;cAnBjB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;IAExB,mCAAmC;;;;;;;;;;;2BAHC,MAAM,KAAK,MAAM;;;;AAjCzD,wBA4EG"}
@@ -35,17 +35,17 @@ declare const _default: import('vue').DefineComponent<{
35
35
  type: PropType<(data: string) => string>;
36
36
  default: (data: string) => string;
37
37
  };
38
+ /** 容器高度 100% 充满父级;编辑区高度 = 容器高度 - 工具栏高度(动态测量) */
39
+ fitHeight: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
38
43
  }, {
39
44
  normalizedType: import('vue').ComputedRef<QEditorType>;
40
45
  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<{
46
+ onEditorReady: (editor: QEditorInstance) => void;
47
+ onEditorDestroy: () => void;
48
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("blur" | "focus" | "input" | "ready" | "destroy" | "update:modelValue")[], string, Readonly<import('vue').ExtractPropTypes<{
49
49
  /** 编辑器类型:classic / inline / document */
50
50
  type: {
51
51
  type: PropType<QEditorType>;
@@ -79,6 +79,11 @@ declare const _default: import('vue').DefineComponent<{
79
79
  type: PropType<(data: string) => string>;
80
80
  default: (data: string) => string;
81
81
  };
82
+ /** 容器高度 100% 充满父级;编辑区高度 = 容器高度 - 工具栏高度(动态测量) */
83
+ fitHeight: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
82
87
  }>>, {
83
88
  value: string;
84
89
  config: EditorConfig;
@@ -88,6 +93,7 @@ declare const _default: import('vue').DefineComponent<{
88
93
  dataNormalizer: (data: string) => string;
89
94
  modelValue: string;
90
95
  type: QEditorType;
96
+ fitHeight: boolean;
91
97
  }>;
92
98
  export default _default;
93
99
  //# sourceMappingURL=QCKEditor.d.ts.map
@@ -1 +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,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M,CAAC;wBACpC,MAAM;;IAExB,gDAAgD;;;;;;;;;;;2BAHZ,MAAM,KAAK,MAAM;;;;;AAtCzD,wBAyKG"}
@@ -107,6 +107,7 @@ declare const _default: import('vue').DefineComponent<{
107
107
  '--q-content-bg': string;
108
108
  '--q-content-bg-hover': string;
109
109
  }>;
110
+ classicConfig: import('vue').ComputedRef<EditorConfig>;
110
111
  contentProps: import('vue').ComputedRef<{
111
112
  containerClass: string;
112
113
  sanitize: boolean;
@@ -221,6 +222,7 @@ declare const _default: import('vue').DefineComponent<{
221
222
  dataNormalizer: (data: string) => string;
222
223
  modelValue: string;
223
224
  placeholder: string;
225
+ fitHeight: boolean;
224
226
  content: string;
225
227
  containerClass: string;
226
228
  sanitize: boolean;
@@ -230,7 +232,6 @@ declare const _default: import('vue').DefineComponent<{
230
232
  disableExit: boolean;
231
233
  minHeight: number;
232
234
  height: number;
233
- fitHeight: boolean;
234
235
  contentBgColor: string;
235
236
  contentBgHoverColor: string;
236
237
  borderRadius: number;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CxB,2CAA2C;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;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CxB,2CAA2C;;cAEf,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,sCAAsC;;;;;;cAMT,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;;;;;;;;;mBAmEC,MAAM,GAAG,QAAQ;;;;;;;;;;;;;;kCA0BpD,KAAK;;6BAkDV,UAAU;gCAsBP,UAAU;0BA4BhB,iBAAiB;;;;wBAyCnB,MAAM,SAAS,SAAS,UAAU,iBAAiB;;;;;;;;;;;cApT5D,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;cAgBpB,QAAQ,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;wBACpC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CxB,2CAA2C;;cAEf,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;IAGrD,sCAAsC;;;;;;cAMT,QAAQ,CAAC,OAAO,GAAG,sBAAsB,CAAC;;;;;;;;;2BA1DnC,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;AAlCzD,wBAgbG"}
@@ -0,0 +1,15 @@
1
+ import { QEditorInstance, QEditorType } from '../types';
2
+ export interface FitHeightController {
3
+ /** 重新测量并应用高度 */
4
+ update: () => void;
5
+ /** 还原样式并断开监听 */
6
+ destroy: () => void;
7
+ }
8
+ /**
9
+ * 按编辑器类型应用 fitHeight。
10
+ * - classic:JS 测量 —— 编辑区高度 = 容器高度 - 顶部工具栏高度,ResizeObserver 跟踪动态变化
11
+ * - inline:无固定工具栏(浮动 balloon),容器 100% 高度即可
12
+ * - document:已有 flex 布局充满父级(见 styles/index.css),无需 JS 介入
13
+ */
14
+ export declare function applyFitHeight(editor: QEditorInstance, type: QEditorType): FitHeightController | null;
15
+ //# sourceMappingURL=fitHeight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fitHeight.d.ts","sourceRoot":"","sources":["../../../src/utils/fitHeight.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,gBAAgB;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gBAAgB;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAID;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW,GAAG,mBAAmB,GAAG,IAAI,CAmDrG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itshixun/qckeditor-vue2",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "description": "Vue2 components for CKEditor 5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",