@keyblade/tinymce-editor-vue2 0.0.2 → 0.0.4
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 +2 -0
- package/es/editor.vue.d.ts +11 -4
- package/es/editor.vue2.js +79 -78
- package/es/index.d.ts +26 -0
- package/package.json +3 -10
package/README.md
CHANGED
package/es/editor.vue.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Editor, RawEditorOptions } from 'tinymce';
|
|
2
2
|
|
|
3
|
-
declare const _default: import('vue
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
4
|
/** vue2 v-model */
|
|
5
5
|
value?: string | undefined;
|
|
6
6
|
/** vue3 v-model */
|
|
@@ -9,6 +9,8 @@ declare const _default: import('vue-demi').DefineComponent<__VLS_WithDefaults<__
|
|
|
9
9
|
imageMaxSize?: number | undefined;
|
|
10
10
|
/** 图片允许的类型 */
|
|
11
11
|
imageAllowedType?: string[] | undefined;
|
|
12
|
+
/** 图片允许的类型 */
|
|
13
|
+
imageAllowedMineType?: string[] | undefined;
|
|
12
14
|
/** 图片最小宽度 */
|
|
13
15
|
imageMinWidth?: number | undefined;
|
|
14
16
|
/** 图片最小高度 */
|
|
@@ -42,18 +44,19 @@ declare const _default: import('vue-demi').DefineComponent<__VLS_WithDefaults<__
|
|
|
42
44
|
modelValue: string;
|
|
43
45
|
imageMaxSize: number;
|
|
44
46
|
imageAllowedType: () => string[];
|
|
47
|
+
imageAllowedMineType: () => string[];
|
|
45
48
|
imageMinWidth: number;
|
|
46
49
|
imageMinHeight: number;
|
|
47
50
|
imageMaxWidth: number;
|
|
48
51
|
imageMaxHeight: number;
|
|
49
52
|
options: () => {};
|
|
50
53
|
}>, {
|
|
51
|
-
insRef: import('vue
|
|
52
|
-
editorRef: import('vue
|
|
54
|
+
insRef: import('vue').Ref<HTMLElement | undefined>;
|
|
55
|
+
editorRef: import('vue').Ref<Editor | undefined>;
|
|
53
56
|
}, {}, {}, {}, import('vue/types/v3-component-options').ComponentOptionsMixin, import('vue/types/v3-component-options').ComponentOptionsMixin, {
|
|
54
57
|
input: (value: string) => void;
|
|
55
58
|
"update:modelValue": (value: string) => void;
|
|
56
|
-
}, string, Readonly<import('vue
|
|
59
|
+
}, string, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
57
60
|
/** vue2 v-model */
|
|
58
61
|
value?: string | undefined;
|
|
59
62
|
/** vue3 v-model */
|
|
@@ -62,6 +65,8 @@ declare const _default: import('vue-demi').DefineComponent<__VLS_WithDefaults<__
|
|
|
62
65
|
imageMaxSize?: number | undefined;
|
|
63
66
|
/** 图片允许的类型 */
|
|
64
67
|
imageAllowedType?: string[] | undefined;
|
|
68
|
+
/** 图片允许的类型 */
|
|
69
|
+
imageAllowedMineType?: string[] | undefined;
|
|
65
70
|
/** 图片最小宽度 */
|
|
66
71
|
imageMinWidth?: number | undefined;
|
|
67
72
|
/** 图片最小高度 */
|
|
@@ -95,6 +100,7 @@ declare const _default: import('vue-demi').DefineComponent<__VLS_WithDefaults<__
|
|
|
95
100
|
modelValue: string;
|
|
96
101
|
imageMaxSize: number;
|
|
97
102
|
imageAllowedType: () => string[];
|
|
103
|
+
imageAllowedMineType: () => string[];
|
|
98
104
|
imageMinWidth: number;
|
|
99
105
|
imageMinHeight: number;
|
|
100
106
|
imageMaxWidth: number;
|
|
@@ -105,6 +111,7 @@ declare const _default: import('vue-demi').DefineComponent<__VLS_WithDefaults<__
|
|
|
105
111
|
modelValue: string;
|
|
106
112
|
imageMaxSize: number;
|
|
107
113
|
imageAllowedType: string[];
|
|
114
|
+
imageAllowedMineType: string[];
|
|
108
115
|
imageMinWidth: number;
|
|
109
116
|
imageMinHeight: number;
|
|
110
117
|
imageMaxWidth: number;
|
package/es/editor.vue2.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import G from "
|
|
6
|
-
import { addI18n as j } from "./langs/zh_CN.js";
|
|
1
|
+
import { defineComponent as F, ref as y, computed as W, onMounted as N, onUnmounted as j, watch as L } from "vue";
|
|
2
|
+
import q from "compressorjs";
|
|
3
|
+
import { conclude as _ } from "vue-global-config";
|
|
4
|
+
import E from "tinymce";
|
|
5
|
+
import { addI18n as G } from "./langs/zh_CN.js";
|
|
7
6
|
import "tinymce/skins/ui/oxide/skin";
|
|
8
7
|
import "tinymce/models/dom";
|
|
9
8
|
import "tinymce/themes/silver";
|
|
@@ -32,14 +31,15 @@ import "tinymce/plugins/table";
|
|
|
32
31
|
import "tinymce/plugins/visualblocks";
|
|
33
32
|
import "tinymce/plugins/visualchars";
|
|
34
33
|
import "tinymce/plugins/wordcount";
|
|
35
|
-
import { globalProps as
|
|
36
|
-
const
|
|
34
|
+
import { globalProps as d } from "./index.js";
|
|
35
|
+
const ke = /* @__PURE__ */ F({
|
|
37
36
|
__name: "editor",
|
|
38
37
|
props: {
|
|
39
38
|
value: { default: "" },
|
|
40
39
|
modelValue: { default: "" },
|
|
41
40
|
imageMaxSize: { default: 30 },
|
|
42
41
|
imageAllowedType: { default: () => ["jpg", "jpeg", "png", "bmp", "heif", "gif", "webp"] },
|
|
42
|
+
imageAllowedMineType: { default: () => ["image/jpg", "image/jpeg", "image/png", "image/bmp", "image/heif", "image/heic", "image/gif", "image/webp"] },
|
|
43
43
|
imageMinWidth: { default: 60 },
|
|
44
44
|
imageMinHeight: { default: 60 },
|
|
45
45
|
imageMaxWidth: { default: 6e3 },
|
|
@@ -51,50 +51,50 @@ const He = /* @__PURE__ */ O({
|
|
|
51
51
|
options: { default: () => ({}) }
|
|
52
52
|
},
|
|
53
53
|
emits: ["input", "update:modelValue"],
|
|
54
|
-
setup(
|
|
55
|
-
const a =
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
async function
|
|
54
|
+
setup(O, { expose: R, emit: b }) {
|
|
55
|
+
const a = O;
|
|
56
|
+
G();
|
|
57
|
+
const M = y(), m = y(), g = y(!1), f = y(!1);
|
|
58
|
+
async function A(n) {
|
|
59
59
|
var o, e;
|
|
60
|
-
const
|
|
61
|
-
for (let i of
|
|
60
|
+
const s = n.getElementsByTagName("img");
|
|
61
|
+
for (let i of s) {
|
|
62
62
|
const t = i.src;
|
|
63
63
|
if (t.startsWith("http://") || t.startsWith("https://")) {
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
64
|
+
const r = await C(t);
|
|
65
|
+
if (r.width < a.imageMinWidth && r.height < a.imageMinHeight || r.width > a.imageMaxWidth && r.height > a.imageMaxHeight) {
|
|
66
66
|
(o = i == null ? void 0 : i.remove) == null || o.call(i);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
if (!a.imageAllowedType.includes(
|
|
69
|
+
const w = t.split("."), S = w[w.length - 1].toLowerCase();
|
|
70
|
+
if (!a.imageAllowedType.includes(S)) {
|
|
71
71
|
(e = i == null ? void 0 : i.remove) == null || e.call(i);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
const
|
|
78
|
-
const
|
|
77
|
+
const H = (n) => {
|
|
78
|
+
const s = n.split(","), o = s[0].match(/:(.*?);/)[1], e = atob(s[1]);
|
|
79
79
|
let i = e.length;
|
|
80
80
|
const t = new Uint8Array(i);
|
|
81
81
|
for (; i--; )
|
|
82
82
|
t[i] = e.charCodeAt(i);
|
|
83
83
|
return new Blob([t], { type: o });
|
|
84
84
|
};
|
|
85
|
-
function
|
|
86
|
-
return new Promise((
|
|
85
|
+
function C(n) {
|
|
86
|
+
return new Promise((s) => {
|
|
87
87
|
const o = new Image();
|
|
88
88
|
o.onload = function() {
|
|
89
|
-
|
|
89
|
+
s({ width: o.width, height: o.height, image: o });
|
|
90
90
|
}, o.src = n;
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function T(n, s) {
|
|
94
94
|
return new Promise((o) => {
|
|
95
|
-
new
|
|
96
|
-
...
|
|
97
|
-
success(e) {
|
|
95
|
+
new q(n, {
|
|
96
|
+
...s,
|
|
97
|
+
success: async (e) => {
|
|
98
98
|
o({ success: !0, file: e });
|
|
99
99
|
},
|
|
100
100
|
error(e) {
|
|
@@ -103,16 +103,16 @@ const He = /* @__PURE__ */ O({
|
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
() =>
|
|
106
|
+
const h = W(
|
|
107
|
+
() => _([a.paste_preprocess, d.paste_preprocess], {
|
|
108
108
|
type: Function
|
|
109
109
|
})
|
|
110
|
-
),
|
|
111
|
-
() =>
|
|
110
|
+
), v = W(
|
|
111
|
+
() => _([a.paste_postprocess, d.paste_postprocess], {
|
|
112
112
|
type: Function
|
|
113
113
|
})
|
|
114
|
-
), c =
|
|
115
|
-
() =>
|
|
114
|
+
), c = W(
|
|
115
|
+
() => _([a.imageUploadHandle, d.imageUploadHandle], {
|
|
116
116
|
type: Function
|
|
117
117
|
})
|
|
118
118
|
);
|
|
@@ -124,7 +124,7 @@ const He = /* @__PURE__ */ O({
|
|
|
124
124
|
language: "zh_CN",
|
|
125
125
|
/** 需要配置到外部 */
|
|
126
126
|
// 实例
|
|
127
|
-
target:
|
|
127
|
+
target: M.value,
|
|
128
128
|
// 隐藏品牌
|
|
129
129
|
branding: !1,
|
|
130
130
|
// 隐藏右上角升级按钮
|
|
@@ -189,48 +189,49 @@ const He = /* @__PURE__ */ O({
|
|
|
189
189
|
// 粘贴前处理
|
|
190
190
|
paste_preprocess(o, e) {
|
|
191
191
|
var i;
|
|
192
|
-
e.content = e.content.replace(/<video[^>]*(?:\/>|>[\s\S]*?<\/video>)/g, ""), e.content = e.content.replace(/<audio[^>]*(?:\/>|>[\s\S]*?<\/audio>)/g, ""), e.content = e.content.replace(/<nav/g, "<div").replace(/<\/nav>/g, "</div>"), e.content = e.content.replace(/<header/g, "<div").replace(/<\/header>/g, "</div>"), e.content = e.content.replace(/<footer/g, "<div").replace(/<\/footer>/g, "</div>"), e.content = e.content.replace(/<aside/g, "<div").replace(/<\/aside>/g, "</div>"), e.content = e.content.replace(/<section/g, "<div").replace(/<\/section>/g, "</div>"), e.content = e.content.replace(/<main/g, "<div").replace(/<\/main>/g, "</div>"), e.content = e.content.replace(/<article/g, "<div").replace(/<\/article>/g, "</div>"), e.content = e.content.replace(/<details/g, "<div").replace(/<\/details>/g, "</div>"), (i =
|
|
192
|
+
e.content = e.content.replace(/<video[^>]*(?:\/>|>[\s\S]*?<\/video>)/g, ""), e.content = e.content.replace(/<audio[^>]*(?:\/>|>[\s\S]*?<\/audio>)/g, ""), e.content = e.content.replace(/<nav/g, "<div").replace(/<\/nav>/g, "</div>"), e.content = e.content.replace(/<header/g, "<div").replace(/<\/header>/g, "</div>"), e.content = e.content.replace(/<footer/g, "<div").replace(/<\/footer>/g, "</div>"), e.content = e.content.replace(/<aside/g, "<div").replace(/<\/aside>/g, "</div>"), e.content = e.content.replace(/<section/g, "<div").replace(/<\/section>/g, "</div>"), e.content = e.content.replace(/<main/g, "<div").replace(/<\/main>/g, "</div>"), e.content = e.content.replace(/<article/g, "<div").replace(/<\/article>/g, "</div>"), e.content = e.content.replace(/<details/g, "<div").replace(/<\/details>/g, "</div>"), (i = h.value) == null || i.call(h, o, e);
|
|
193
193
|
},
|
|
194
194
|
// 粘贴后处理(处理异步操作)
|
|
195
195
|
paste_postprocess(o, e) {
|
|
196
196
|
var t;
|
|
197
197
|
const i = e.node;
|
|
198
|
-
|
|
198
|
+
A(i), (t = v.value) == null || t.call(v, o, e);
|
|
199
199
|
},
|
|
200
200
|
images_upload_handler(o) {
|
|
201
201
|
return new Promise(async (e, i) => {
|
|
202
|
-
var
|
|
203
|
-
const t = (
|
|
204
|
-
let
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
202
|
+
var x, V, B;
|
|
203
|
+
const t = (V = (x = d.message) == null ? void 0 : x.loading) == null ? void 0 : V.call(x);
|
|
204
|
+
let r = o.blob();
|
|
205
|
+
const w = o.base64(), S = o.filename(), P = r.name.split("."), $ = P[P.length - 1].toLowerCase();
|
|
206
|
+
if (r.size > a.imageMaxSize * 1024 * 1024)
|
|
207
207
|
return t == null || t.close(), i({ message: `请上传大小不超过${a.imageMaxSize}M的图片`, remove: !0 });
|
|
208
|
-
if (!a.
|
|
209
|
-
return t == null || t.close(), i({ message: `请上传格式为${a.imageAllowedType.map((
|
|
210
|
-
const
|
|
211
|
-
if (
|
|
208
|
+
if (!a.imageAllowedMineType.includes(r.type))
|
|
209
|
+
return t == null || t.close(), i({ message: `请上传格式为${a.imageAllowedType.map((u) => u.toUpperCase()).join("、")}的图片`, remove: !0 });
|
|
210
|
+
const U = "data:" + r.type + ";base64," + w, p = await C(U);
|
|
211
|
+
if (p.width < a.imageMinWidth && p.height < a.imageMinHeight || p.width > a.imageMaxWidth && p.height > a.imageMaxHeight)
|
|
212
212
|
return t == null || t.close(), i({ message: `请上传像素不低于${a.imageMinWidth}*${a.imageMinHeight}且像素不高于${a.imageMaxWidth}*${a.imageMaxHeight}的图片`, remove: !0 });
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
213
|
+
const l = {};
|
|
214
|
+
["image/heif", "image/heic", "image/webp"].includes($) && (l.convertTypes = [r.type], l.convertSize = 0);
|
|
215
|
+
const k = 5 * 1024 * 1024;
|
|
216
|
+
if (r.size > k && (l.convertTypes = [r.type], l.convertSize = k, l.maxWidth = p.width * (k / r.size)), Object.keys(l).length > 0) {
|
|
217
|
+
const u = await T(H(U), l);
|
|
218
|
+
if (u.success)
|
|
219
|
+
r = u.file;
|
|
220
|
+
else
|
|
221
|
+
return t == null || t.close(), i({ message: u.error, remove: !0 });
|
|
222
|
+
}
|
|
222
223
|
if (!c.value)
|
|
223
224
|
return t == null || t.close(), i({ message: "缺少图片上传配置", remove: !0 });
|
|
224
|
-
const
|
|
225
|
-
if (!
|
|
226
|
-
return t == null || t.close(), i({ message:
|
|
227
|
-
t == null || t.close(), e(
|
|
225
|
+
const z = await ((B = c.value) == null ? void 0 : B.call(c, r, S));
|
|
226
|
+
if (!z.success)
|
|
227
|
+
return t == null || t.close(), i({ message: z.errorMessage, remove: !0 });
|
|
228
|
+
t == null || t.close(), e(z.url);
|
|
228
229
|
});
|
|
229
230
|
}
|
|
230
|
-
},
|
|
231
|
+
}, s = _(
|
|
231
232
|
[
|
|
232
233
|
a.options,
|
|
233
|
-
|
|
234
|
+
d.tinymceOptions,
|
|
234
235
|
n
|
|
235
236
|
],
|
|
236
237
|
{
|
|
@@ -240,36 +241,36 @@ const He = /* @__PURE__ */ O({
|
|
|
240
241
|
type: Object
|
|
241
242
|
}
|
|
242
243
|
);
|
|
243
|
-
|
|
244
|
+
E.init(s).then(([o]) => {
|
|
244
245
|
var e;
|
|
245
246
|
o.on("change input Redo Undo SetContent", () => {
|
|
246
|
-
if (
|
|
247
|
-
|
|
247
|
+
if (f.value) {
|
|
248
|
+
f.value = !1;
|
|
248
249
|
return;
|
|
249
250
|
}
|
|
250
|
-
|
|
251
|
-
}),
|
|
251
|
+
g.value = !0, b("input", o.getContent()), b("update:modelValue", o.getContent());
|
|
252
|
+
}), m.value = o, (e = a.initComplete) == null || e.call(a);
|
|
252
253
|
});
|
|
253
|
-
}),
|
|
254
|
+
}), j(() => {
|
|
254
255
|
var n;
|
|
255
|
-
(n =
|
|
256
|
-
}),
|
|
257
|
-
() => [a.value, a.modelValue,
|
|
256
|
+
(n = m.value) == null || n.destroy();
|
|
257
|
+
}), L(
|
|
258
|
+
() => [a.value, a.modelValue, m.value],
|
|
258
259
|
() => {
|
|
259
260
|
var n;
|
|
260
|
-
if (
|
|
261
|
-
|
|
261
|
+
if (g.value) {
|
|
262
|
+
g.value = !1;
|
|
262
263
|
return;
|
|
263
264
|
}
|
|
264
|
-
|
|
265
|
+
f.value = !0, (n = m.value) == null || n.setContent(a.value ?? a.modelValue ?? "");
|
|
265
266
|
},
|
|
266
267
|
{ immediate: !0 }
|
|
267
|
-
),
|
|
268
|
-
insRef:
|
|
269
|
-
editorRef:
|
|
270
|
-
}), { __sfc: !0, insRef:
|
|
268
|
+
), R({
|
|
269
|
+
insRef: M,
|
|
270
|
+
editorRef: m
|
|
271
|
+
}), { __sfc: !0, insRef: M, editorRef: m, preventSettingContent: g, preventUpdatingModelValue: f, props: a, emits: b, processPastedImage: A, dataURLtoBlob: H, getImagePixel: C, compressorImage: T, paste_preprocess: h, paste_postprocess: v, imageUploadHandle: c };
|
|
271
272
|
}
|
|
272
273
|
});
|
|
273
274
|
export {
|
|
274
|
-
|
|
275
|
+
ke as default
|
|
275
276
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -45,6 +45,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
|
|
|
45
45
|
type: import('vue').PropType<string[]>;
|
|
46
46
|
default: () => string[];
|
|
47
47
|
};
|
|
48
|
+
imageAllowedMineType: {
|
|
49
|
+
type: import('vue').PropType<string[]>;
|
|
50
|
+
default: () => string[];
|
|
51
|
+
};
|
|
48
52
|
imageMinWidth: {
|
|
49
53
|
type: import('vue').PropType<number>;
|
|
50
54
|
default: number;
|
|
@@ -104,6 +108,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
|
|
|
104
108
|
type: import('vue').PropType<string[]>;
|
|
105
109
|
default: () => string[];
|
|
106
110
|
};
|
|
111
|
+
imageAllowedMineType: {
|
|
112
|
+
type: import('vue').PropType<string[]>;
|
|
113
|
+
default: () => string[];
|
|
114
|
+
};
|
|
107
115
|
imageMinWidth: {
|
|
108
116
|
type: import('vue').PropType<number>;
|
|
109
117
|
default: number;
|
|
@@ -154,6 +162,7 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
|
|
|
154
162
|
modelValue: string;
|
|
155
163
|
imageMaxSize: number;
|
|
156
164
|
imageAllowedType: string[];
|
|
165
|
+
imageAllowedMineType: string[];
|
|
157
166
|
imageMinWidth: number;
|
|
158
167
|
imageMinHeight: number;
|
|
159
168
|
imageMaxWidth: number;
|
|
@@ -176,6 +185,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
|
|
|
176
185
|
type: import('vue').PropType<string[]>;
|
|
177
186
|
default: () => string[];
|
|
178
187
|
};
|
|
188
|
+
imageAllowedMineType: {
|
|
189
|
+
type: import('vue').PropType<string[]>;
|
|
190
|
+
default: () => string[];
|
|
191
|
+
};
|
|
179
192
|
imageMinWidth: {
|
|
180
193
|
type: import('vue').PropType<number>;
|
|
181
194
|
default: number;
|
|
@@ -238,6 +251,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
|
|
|
238
251
|
type: import('vue').PropType<string[]>;
|
|
239
252
|
default: () => string[];
|
|
240
253
|
};
|
|
254
|
+
imageAllowedMineType: {
|
|
255
|
+
type: import('vue').PropType<string[]>;
|
|
256
|
+
default: () => string[];
|
|
257
|
+
};
|
|
241
258
|
imageMinWidth: {
|
|
242
259
|
type: import('vue').PropType<number>;
|
|
243
260
|
default: number;
|
|
@@ -297,6 +314,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
|
|
|
297
314
|
type: import('vue').PropType<string[]>;
|
|
298
315
|
default: () => string[];
|
|
299
316
|
};
|
|
317
|
+
imageAllowedMineType: {
|
|
318
|
+
type: import('vue').PropType<string[]>;
|
|
319
|
+
default: () => string[];
|
|
320
|
+
};
|
|
300
321
|
imageMinWidth: {
|
|
301
322
|
type: import('vue').PropType<number>;
|
|
302
323
|
default: number;
|
|
@@ -350,6 +371,7 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
|
|
|
350
371
|
modelValue: string;
|
|
351
372
|
imageMaxSize: number;
|
|
352
373
|
imageAllowedType: string[];
|
|
374
|
+
imageAllowedMineType: string[];
|
|
353
375
|
imageMinWidth: number;
|
|
354
376
|
imageMinHeight: number;
|
|
355
377
|
imageMaxWidth: number;
|
|
@@ -373,6 +395,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
|
|
|
373
395
|
type: import('vue').PropType<string[]>;
|
|
374
396
|
default: () => string[];
|
|
375
397
|
};
|
|
398
|
+
imageAllowedMineType: {
|
|
399
|
+
type: import('vue').PropType<string[]>;
|
|
400
|
+
default: () => string[];
|
|
401
|
+
};
|
|
376
402
|
imageMinWidth: {
|
|
377
403
|
type: import('vue').PropType<number>;
|
|
378
404
|
default: number;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@keyblade/tinymce-editor-vue2",
|
|
3
3
|
"description": "KeyBlade Tinymce Editor Vue2",
|
|
4
4
|
"author": "yangshuai <704807396@qq.com>",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.4",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "es/index.js",
|
|
@@ -22,18 +22,11 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"compressorjs": "^1.2.1",
|
|
24
24
|
"vue-global-config": "^0.6.1",
|
|
25
|
-
"tinymce": "^7.1.0"
|
|
26
|
-
"vue-demi": "^0.14.7"
|
|
25
|
+
"tinymce": "^7.1.0"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {},
|
|
29
28
|
"peerDependencies": {
|
|
30
|
-
"
|
|
31
|
-
"vue": "^2.0.0 || >=3.3.4"
|
|
32
|
-
},
|
|
33
|
-
"peerDependenciesMeta": {
|
|
34
|
-
"@vue/composition-api": {
|
|
35
|
-
"optional": true
|
|
36
|
-
}
|
|
29
|
+
"vue": "^2.7.0"
|
|
37
30
|
},
|
|
38
31
|
"scripts": {
|
|
39
32
|
"build": "vite build",
|