@keyblade/tinymce-editor-vue2 0.0.12-alpha.9 → 0.1.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 +130 -119
- package/es/editor.vue.d.ts +25 -219
- package/es/editor.vue.js +20 -19
- package/es/editor.vue2.js +427 -291
- package/es/index.d.ts +85 -805
- package/es/index.js +12 -11
- package/es/langs/zh_CN.d.ts +0 -5
- package/es/langs/zh_CN.js +1 -1
- package/es/style.css +1 -1
- package/es/types.d.ts +91 -0
- package/es/util.d.ts +13 -32
- package/es/util.js +20 -68
- package/package.json +5 -4
- package/src/index.ts +16 -31
- /package/es/{editor.vue3.js → style.less.js} +0 -0
package/es/editor.vue2.js
CHANGED
|
@@ -1,9 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var ze = Object.defineProperty, Ve = Object.defineProperties;
|
|
2
|
+
var Be = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var re = Object.getOwnPropertySymbols;
|
|
4
|
+
var He = Object.prototype.hasOwnProperty, qe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var le = (u, n) => (n = Symbol[u]) ? n : Symbol.for("Symbol." + u);
|
|
6
|
+
var ne = (u, n, i) => n in u ? ze(u, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : u[n] = i, C = (u, n) => {
|
|
7
|
+
for (var i in n || (n = {}))
|
|
8
|
+
He.call(n, i) && ne(u, i, n[i]);
|
|
9
|
+
if (re)
|
|
10
|
+
for (var i of re(n))
|
|
11
|
+
qe.call(n, i) && ne(u, i, n[i]);
|
|
12
|
+
return u;
|
|
13
|
+
}, j = (u, n) => Ve(u, Be(n));
|
|
14
|
+
var N = (u, n, i) => new Promise((I, M) => {
|
|
15
|
+
var P = (h) => {
|
|
16
|
+
try {
|
|
17
|
+
m(i.next(h));
|
|
18
|
+
} catch (T) {
|
|
19
|
+
M(T);
|
|
20
|
+
}
|
|
21
|
+
}, k = (h) => {
|
|
22
|
+
try {
|
|
23
|
+
m(i.throw(h));
|
|
24
|
+
} catch (T) {
|
|
25
|
+
M(T);
|
|
26
|
+
}
|
|
27
|
+
}, m = (h) => h.done ? I(h.value) : Promise.resolve(h.value).then(P, k);
|
|
28
|
+
m((i = i.apply(u, n)).next());
|
|
29
|
+
});
|
|
30
|
+
var X = (u, n, i) => (n = u[le("asyncIterator")]) ? n.call(u) : (u = u[le("iterator")](), n = {}, i = (I, M) => (M = u[I]) && (n[I] = (P) => new Promise((k, m, h) => (P = M.call(u, P), h = P.done, Promise.resolve(P.value).then((T) => k({ value: T, done: h }), m)))), i("next"), i("return"), n);
|
|
31
|
+
import { defineComponent as je, ref as y, computed as E, watch as O, onMounted as Ee, onUnmounted as $e } from "vue";
|
|
32
|
+
import { oneTravelImgPondBeforeAddFile as se, oneTravelImageCompressor as ue, oneTravelImageCheckAndTransform as Fe } from "@keyblade/one-travel";
|
|
33
|
+
import { blobToFile as me, getImagePixel as Re, getFileExtension as We } from "./util.js";
|
|
34
|
+
import "./style.less.js";
|
|
35
|
+
import Ne from "imgpond";
|
|
36
|
+
import { conclude as $ } from "vue-global-config";
|
|
37
|
+
import de from "tinymce";
|
|
38
|
+
import Oe from "./langs/zh_CN.js";
|
|
7
39
|
import "tinymce/skins/ui/oxide/skin";
|
|
8
40
|
import "tinymce/models/dom";
|
|
9
41
|
import "tinymce/themes/silver";
|
|
@@ -18,6 +50,8 @@ import "tinymce/plugins/directionality";
|
|
|
18
50
|
import "tinymce/plugins/emoticons";
|
|
19
51
|
import "tinymce/plugins/emoticons/js/emojis.min";
|
|
20
52
|
import "tinymce/plugins/fullscreen";
|
|
53
|
+
import "tinymce/plugins/help";
|
|
54
|
+
import "tinymce/plugins/help/js/i18n/keynav/zh_CN";
|
|
21
55
|
import "tinymce/plugins/image";
|
|
22
56
|
import "tinymce/plugins/insertdatetime";
|
|
23
57
|
import "tinymce/plugins/link";
|
|
@@ -32,63 +66,103 @@ import "tinymce/plugins/table";
|
|
|
32
66
|
import "tinymce/plugins/visualblocks";
|
|
33
67
|
import "tinymce/plugins/visualchars";
|
|
34
68
|
import "tinymce/plugins/wordcount";
|
|
35
|
-
import { globalProps as
|
|
36
|
-
import {
|
|
37
|
-
const
|
|
69
|
+
import { globalProps as F } from "./index.js";
|
|
70
|
+
import { Message as g } from "element-ui";
|
|
71
|
+
const Va = /* @__PURE__ */ je({
|
|
38
72
|
__name: "editor",
|
|
39
73
|
props: {
|
|
40
74
|
value: { default: "" },
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
imageMaxSize: { default: 30 },
|
|
47
|
-
imageAllowedType: { default: () => ["jpg", "jpeg", "png", "bmp", "heif", "gif", "webp"] },
|
|
48
|
-
imageAllowedMineType: { default: () => ["image/jpg", "image/jpeg", "image/png", "image/bmp", "image/heif", "image/heic", "image/gif", "image/webp"] },
|
|
49
|
-
imageMinWidth: { default: 60 },
|
|
50
|
-
imageMinHeight: { default: 60 },
|
|
51
|
-
imageMaxWidth: { default: 6e3 },
|
|
52
|
-
imageMaxHeight: { default: 6e3 },
|
|
53
|
-
audioEnable: { type: Boolean, default: !0 },
|
|
54
|
-
audioMaxSize: { default: 200 },
|
|
55
|
-
audioAllowedType: { default: () => ["MP3", "M4A", "WAV", "AAC"] },
|
|
75
|
+
disabled: { type: Boolean, default: !1 },
|
|
76
|
+
extParameters: { default: () => ({}) },
|
|
77
|
+
options: { default: () => ({}) },
|
|
78
|
+
imageUploadOptions: null,
|
|
79
|
+
imgPondOptions: null,
|
|
56
80
|
audioUploadOptions: null,
|
|
57
|
-
videoEnable: { type: Boolean, default: !0 },
|
|
58
|
-
videoMaxSize: { default: 300 },
|
|
59
|
-
videoAllowedType: { default: () => ["MP4", "3GP"] },
|
|
60
81
|
videoUploadOptions: null,
|
|
61
|
-
|
|
62
|
-
paste_preprocess: null,
|
|
63
|
-
paste_postprocess: null,
|
|
64
|
-
initComplete: null,
|
|
65
|
-
options: { default: () => ({}) },
|
|
66
|
-
imgPondOptions: null
|
|
82
|
+
initComplete: null
|
|
67
83
|
},
|
|
68
|
-
emits: ["input"
|
|
69
|
-
setup(
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
const
|
|
84
|
+
emits: ["input"],
|
|
85
|
+
setup(u, { emit: n }) {
|
|
86
|
+
const i = u;
|
|
87
|
+
de.addI18n("zh_CN", Oe);
|
|
88
|
+
const I = {
|
|
89
|
+
maxCount: 10,
|
|
90
|
+
tipText: "上传",
|
|
91
|
+
maxSize: 30,
|
|
92
|
+
allowedType: ["jpg", "jpeg", "png", "bmp", "heif", "heic", "gif", "webp"],
|
|
93
|
+
minWidth: 50,
|
|
94
|
+
minHeight: 50,
|
|
95
|
+
maxWidth: 6e3,
|
|
96
|
+
maxHeight: 6e3
|
|
97
|
+
}, M = {
|
|
98
|
+
enable: !0,
|
|
99
|
+
maxSize: 300,
|
|
100
|
+
allowedType: ["avi", "wmv", "mp4", "mov", "3gp"],
|
|
101
|
+
accept: ".avi,.wmv,.mp4,.mov,.3gp"
|
|
102
|
+
}, P = {
|
|
103
|
+
enable: !0,
|
|
104
|
+
maxSize: 200,
|
|
105
|
+
allowedType: ["wav", "mp3", "mp4", "m4a", "wma", "aac"],
|
|
106
|
+
accept: ".wav,.mp3,.mp4,.m4a,.wma,.aac"
|
|
107
|
+
}, k = y(), m = y(), h = y(!1), T = y(!1), A = y({
|
|
108
|
+
show: !1,
|
|
109
|
+
text: "图片上传中,请稍等"
|
|
110
|
+
}), s = E(() => $([i.imageUploadOptions, F.imageUploadOptions, I]) || {}), p = E(() => $([i.videoUploadOptions, F.videoUploadOptions, M]) || {}), b = E(() => $([i.audioUploadOptions, F.audioUploadOptions, P]) || {}), L = E(() => $([i.imgPondOptions, F.imgPondOptions]) || {}), ce = E(() => {
|
|
111
|
+
var e, a;
|
|
112
|
+
return ((a = (e = s == null ? void 0 : s.value) == null ? void 0 : e.allowedType) == null ? void 0 : a.map((o) => `.${o}`).join(",")) || "";
|
|
113
|
+
}), R = y();
|
|
114
|
+
O(() => R.value, () => {
|
|
115
|
+
R.value && se(R.value, {
|
|
116
|
+
onStart: () => {
|
|
117
|
+
A.value = {
|
|
118
|
+
show: !0,
|
|
119
|
+
text: "图片加载中,请稍等"
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
onSuccess: () => {
|
|
123
|
+
A.value.show = !1;
|
|
124
|
+
},
|
|
125
|
+
onError: (e) => {
|
|
126
|
+
A.value.show = !1, g.error({ message: e, customClass: "tinymce-editor-message", duration: 3e3 });
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}, { immediate: !0 });
|
|
130
|
+
const W = y();
|
|
131
|
+
O(() => W.value, () => {
|
|
132
|
+
W.value && se(W.value, {
|
|
133
|
+
onStart: () => {
|
|
134
|
+
A.value = {
|
|
135
|
+
show: !0,
|
|
136
|
+
text: "图片加载中,请稍等"
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
onSuccess: () => {
|
|
140
|
+
A.value.show = !1;
|
|
141
|
+
},
|
|
142
|
+
onError: (e) => {
|
|
143
|
+
A.value.show = !1, g.error(e);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}, { immediate: !0 });
|
|
147
|
+
const B = y({
|
|
73
148
|
dialogVisible: !1,
|
|
74
149
|
formData: {
|
|
75
150
|
images: []
|
|
76
151
|
}
|
|
77
|
-
}),
|
|
78
|
-
|
|
152
|
+
}), J = y(), K = () => {
|
|
153
|
+
H = [], B.value.dialogVisible = !1, B.value.formData = {
|
|
79
154
|
images: []
|
|
80
155
|
};
|
|
81
|
-
},
|
|
82
|
-
var
|
|
83
|
-
(
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}), c.value.dialogVisible = !1, c.value.formData.images = []);
|
|
156
|
+
}, pe = () => {
|
|
157
|
+
var e;
|
|
158
|
+
H = [], (e = J.value) == null || e.validate((a) => {
|
|
159
|
+
a && (B.value.formData.images.forEach((o) => {
|
|
160
|
+
var r;
|
|
161
|
+
let t = o;
|
|
162
|
+
L.value.srcAt && (t = (o == null ? void 0 : o[L.value.srcAt]) || ""), (r = m.value) == null || r.insertContent(`<img src=${t} alt="" />`);
|
|
163
|
+
}), K());
|
|
90
164
|
});
|
|
91
|
-
},
|
|
165
|
+
}, w = y({
|
|
92
166
|
dialogVisible: !1,
|
|
93
167
|
formData: {
|
|
94
168
|
// 名称
|
|
@@ -100,23 +174,19 @@ const ea = /* @__PURE__ */ me({
|
|
|
100
174
|
},
|
|
101
175
|
// 用于临时保存上传前的参数 { file: File }
|
|
102
176
|
additionalData: {}
|
|
103
|
-
}),
|
|
104
|
-
|
|
105
|
-
(o = z.value) == null || o.validate((l) => {
|
|
106
|
-
var t, e;
|
|
107
|
-
l && ((e = d.value) == null || e.insertContent(`<audio controls data-name="${r.value.formData.name}" data-poster="${r.value.formData.cover[0]}" src="${(t = r.value.formData.file[0]) == null ? void 0 : t.url}"></audio>`), r.value.dialogVisible = !1, r.value.formData = {
|
|
108
|
-
name: "",
|
|
109
|
-
cover: [],
|
|
110
|
-
file: []
|
|
111
|
-
}, r.value.additionalData = {});
|
|
112
|
-
});
|
|
113
|
-
}, L = () => {
|
|
114
|
-
r.value.dialogVisible = !1, r.value.formData = {
|
|
177
|
+
}), Q = y(), Y = () => {
|
|
178
|
+
w.value.dialogVisible = !1, w.value.formData = {
|
|
115
179
|
name: "",
|
|
116
180
|
cover: [],
|
|
117
181
|
file: []
|
|
118
|
-
},
|
|
119
|
-
},
|
|
182
|
+
}, w.value.additionalData = {};
|
|
183
|
+
}, fe = () => {
|
|
184
|
+
var e;
|
|
185
|
+
(e = Q.value) == null || e.validate((a) => {
|
|
186
|
+
var o, t;
|
|
187
|
+
a && ((t = m.value) == null || t.insertContent(`<audio controls controlslist="nodownload noplaybackrate" data-name="${w.value.formData.name}" data-poster="${w.value.formData.cover[0]}" src="${(o = w.value.formData.file[0]) == null ? void 0 : o.url}"></audio>`), Y());
|
|
188
|
+
});
|
|
189
|
+
}, _ = y({
|
|
120
190
|
dialogVisible: !1,
|
|
121
191
|
formData: {
|
|
122
192
|
// 文件
|
|
@@ -124,89 +194,183 @@ const ea = /* @__PURE__ */ me({
|
|
|
124
194
|
},
|
|
125
195
|
// 用于临时保存上传前的参数 { file: File }
|
|
126
196
|
additionalData: {}
|
|
127
|
-
}),
|
|
128
|
-
|
|
129
|
-
(o = H.value) == null || o.validate((l) => {
|
|
130
|
-
var t, e;
|
|
131
|
-
l && ((e = d.value) == null || e.insertContent(`<video controls controlslist="nodownload" src="${(t = s.value.formData.file[0]) == null ? void 0 : t.url}"></video>`), s.value.dialogVisible = !1, s.value.formData = {
|
|
132
|
-
file: []
|
|
133
|
-
}, s.value.additionalData = {});
|
|
134
|
-
});
|
|
135
|
-
}, K = () => {
|
|
136
|
-
s.value.dialogVisible = !1, s.value.formData = {
|
|
197
|
+
}), Z = y(), ee = () => {
|
|
198
|
+
_.value.dialogVisible = !1, _.value.formData = {
|
|
137
199
|
file: []
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
var
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
200
|
+
}, _.value.additionalData = {};
|
|
201
|
+
}, ve = () => {
|
|
202
|
+
var e;
|
|
203
|
+
(e = Z.value) == null || e.validate((a) => {
|
|
204
|
+
var o, t;
|
|
205
|
+
a && ((t = m.value) == null || t.insertContent(`<video width="auto" height="auto" controls src="${(o = _.value.formData.file[0]) == null ? void 0 : o.url}"></video>`), ee());
|
|
206
|
+
});
|
|
207
|
+
}, ge = () => {
|
|
208
|
+
document.querySelectorAll(".swal2-container .swal2-title").forEach((e) => {
|
|
209
|
+
e && (e.innerHTML = `单次最多可选择${s.value.maxCount}张图片`);
|
|
148
210
|
});
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
211
|
+
};
|
|
212
|
+
let H = [];
|
|
213
|
+
const he = (e, a) => new Promise((o, t) => N(this, null, function* () {
|
|
214
|
+
var f, v;
|
|
215
|
+
if (H.find((c) => (c == null ? void 0 : c.uid) === (e == null ? void 0 : e.uid)))
|
|
216
|
+
return setTimeout(() => {
|
|
217
|
+
document.querySelectorAll(".swal2-container").forEach((c) => {
|
|
218
|
+
c == null || c.remove();
|
|
219
|
+
});
|
|
220
|
+
}), t("");
|
|
221
|
+
H.push(e);
|
|
222
|
+
const l = yield ue(e);
|
|
223
|
+
if (!l.success) {
|
|
224
|
+
t(), setTimeout(() => {
|
|
225
|
+
a.onError(l.errorMessage);
|
|
153
226
|
});
|
|
154
227
|
return;
|
|
155
228
|
}
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
158
|
-
|
|
159
|
-
|
|
229
|
+
const d = yield (v = (f = s.value).handleRequest) == null ? void 0 : v.call(f, me(l.file, e.name), e.name, { extParameters: i.extParameters });
|
|
230
|
+
if (!d || !(d != null && d.success)) {
|
|
231
|
+
t(), setTimeout(() => {
|
|
232
|
+
a.onError(d == null ? void 0 : d.errorMessage);
|
|
160
233
|
});
|
|
161
234
|
return;
|
|
162
235
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
236
|
+
o(d.url);
|
|
237
|
+
}));
|
|
238
|
+
function ae(e) {
|
|
239
|
+
return N(this, null, function* () {
|
|
240
|
+
var d, f, v;
|
|
241
|
+
let a = e;
|
|
242
|
+
if (!((d = s.value) != null && d.handleRequest)) {
|
|
243
|
+
g.error("缺少图片上传配置");
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
let o = a.name ? a.name : "";
|
|
247
|
+
if (!(a != null && a.name) && !(a != null && a.lastModified) && a.type === "image/png") {
|
|
248
|
+
g.error("不允许粘贴");
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const t = yield Fe(a, o, {
|
|
252
|
+
imageMaxSize: s.value.maxSize,
|
|
253
|
+
imageAllowedType: s.value.allowedType,
|
|
254
|
+
// imageAllowedMineType: mergeImageUploadOptions.value.allowedMineType,
|
|
255
|
+
imageMinWidth: s.value.minWidth,
|
|
256
|
+
imageMinHeight: s.value.minHeight,
|
|
257
|
+
imageMaxWidth: s.value.maxWidth,
|
|
258
|
+
imageMaxHeight: s.value.maxHeight
|
|
167
259
|
});
|
|
168
|
-
|
|
260
|
+
if (!t.success) {
|
|
261
|
+
g.error((t == null ? void 0 : t.errorMessage) || "");
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (t.hasTransform) {
|
|
265
|
+
a = t.file;
|
|
266
|
+
const c = o == null ? void 0 : o.split(".");
|
|
267
|
+
c.pop(), o = `${c.join(",")}.jpg`;
|
|
268
|
+
}
|
|
269
|
+
const r = yield ue(a);
|
|
270
|
+
if (!r.success) {
|
|
271
|
+
g.error((r == null ? void 0 : r.errorMessage) || "压缩失败");
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const l = yield (v = (f = s.value).handleRequest) == null ? void 0 : v.call(f, me(r.file, o), o, { extParameters: i.extParameters });
|
|
275
|
+
if (!l || !l.success) {
|
|
276
|
+
g.error((l == null ? void 0 : l.errorMessage) || "");
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
return l.url;
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
const G = (e) => N(this, null, function* () {
|
|
283
|
+
var l, d, z;
|
|
284
|
+
const a = m.value, o = e.types;
|
|
285
|
+
if (o.includes("text/html")) {
|
|
286
|
+
const U = e.getData("text/html"), V = new DOMParser().parseFromString(U, "text/html"), ie = Array.from(V.body.querySelectorAll("img")), Ue = Array.from(V.body.querySelectorAll("audio")), Ie = Array.from(V.body.querySelectorAll("video"));
|
|
287
|
+
ie.length > 0 && (A.value = {
|
|
288
|
+
show: !0,
|
|
289
|
+
text: "图片加载中,请稍等"
|
|
290
|
+
});
|
|
291
|
+
for (const D of [...Ue, ...Ie])
|
|
292
|
+
D == null || D.remove();
|
|
293
|
+
try {
|
|
294
|
+
for (var f = X([...ie]), v, c, S; v = !(c = yield f.next()).done; v = !1) {
|
|
295
|
+
const D = c.value;
|
|
296
|
+
if (D.removeAttribute("crossorigin"), D.src.startsWith("http"))
|
|
297
|
+
if ((l = s.value) != null && l.handleRequestByUrl) {
|
|
298
|
+
const x = yield (d = s.value) == null ? void 0 : d.handleRequestByUrl(D.src, { extParameters: i.extParameters });
|
|
299
|
+
x != null && x.success && (x != null && x.url) ? D.src = x == null ? void 0 : x.url : D.remove();
|
|
300
|
+
} else {
|
|
301
|
+
const x = yield Re(D.src);
|
|
302
|
+
x && (x.width < (s.value.minWidth || 0) && x.height < (s.value.minHeight || 0) || x.width > (s.value.maxWidth || 0) && x.height > (s.value.maxHeight || 0)) && D.remove();
|
|
303
|
+
}
|
|
304
|
+
else
|
|
305
|
+
D.remove(), g.error("不支持Word中批量复制图片或视频,请改为单个复制,或者从工具栏中手动插入上传");
|
|
306
|
+
}
|
|
307
|
+
} catch (c) {
|
|
308
|
+
S = [c];
|
|
309
|
+
} finally {
|
|
310
|
+
try {
|
|
311
|
+
v && (c = f.return) && (yield c.call(f));
|
|
312
|
+
} finally {
|
|
313
|
+
if (S)
|
|
314
|
+
throw S[0];
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
A.value.show = !1;
|
|
318
|
+
const ke = new XMLSerializer().serializeToString(V.body);
|
|
319
|
+
a.insertContent(ke);
|
|
320
|
+
} else
|
|
321
|
+
o.includes("text/plain") && a.insertContent(e.getData("text/plain"));
|
|
322
|
+
const t = Array.from((e == null ? void 0 : e.files) || []), r = [];
|
|
323
|
+
for (const U of t) {
|
|
324
|
+
if (!U)
|
|
325
|
+
continue;
|
|
326
|
+
const q = We(U.name);
|
|
327
|
+
U.type.indexOf("image") > -1 || (z = s.value.allowedType) != null && z.includes(q.toLowerCase()) ? r.push(U) : g.error("暂不支持的文件类型");
|
|
169
328
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
329
|
+
if (r.length > 0) {
|
|
330
|
+
A.value = {
|
|
331
|
+
show: !0,
|
|
332
|
+
text: "图片上传中,请稍等"
|
|
333
|
+
};
|
|
334
|
+
try {
|
|
335
|
+
for (var qa = X(r), ja, Ea, $a; ja = !(Ea = yield qa.next()).done; ja = !1) {
|
|
336
|
+
const U = Ea.value;
|
|
337
|
+
const q = yield ae(U);
|
|
338
|
+
if (q) {
|
|
339
|
+
const V = `<img src="${q}" alt="" />`;
|
|
340
|
+
a.insertContent(V);
|
|
341
|
+
}
|
|
182
342
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
343
|
+
} catch (Ea) {
|
|
344
|
+
$a = [Ea];
|
|
345
|
+
} finally {
|
|
346
|
+
try {
|
|
347
|
+
ja && (Ea = qa.return) && (yield Ea.call(qa));
|
|
348
|
+
} finally {
|
|
349
|
+
if ($a)
|
|
350
|
+
throw $a[0];
|
|
187
351
|
}
|
|
188
352
|
}
|
|
353
|
+
A.value.show = !1;
|
|
189
354
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
()
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
const o = {
|
|
355
|
+
n("input", a.getContent());
|
|
356
|
+
}), oe = (e) => {
|
|
357
|
+
var o;
|
|
358
|
+
e.preventDefault();
|
|
359
|
+
const a = e.clipboardData || ((o = e == null ? void 0 : e.originalEvent) == null ? void 0 : o.clipboardData);
|
|
360
|
+
G(a);
|
|
361
|
+
}, te = (e) => {
|
|
362
|
+
var o;
|
|
363
|
+
e.preventDefault();
|
|
364
|
+
const a = e.dataTransfer || ((o = e == null ? void 0 : e.originalEvent) == null ? void 0 : o.dataTransfer);
|
|
365
|
+
G(a);
|
|
366
|
+
};
|
|
367
|
+
Ee(() => {
|
|
368
|
+
var o;
|
|
369
|
+
const e = {
|
|
206
370
|
// 设置语言
|
|
207
371
|
language: "zh_CN",
|
|
208
372
|
// 实例
|
|
209
|
-
target:
|
|
373
|
+
target: k.value,
|
|
210
374
|
// 隐藏品牌
|
|
211
375
|
branding: !1,
|
|
212
376
|
// 隐藏右上角升级按钮
|
|
@@ -241,7 +405,7 @@ const ea = /* @__PURE__ */ me({
|
|
|
241
405
|
"directionality",
|
|
242
406
|
"emoticons",
|
|
243
407
|
"fullscreen",
|
|
244
|
-
|
|
408
|
+
"help",
|
|
245
409
|
"image",
|
|
246
410
|
// 'importcss'
|
|
247
411
|
"insertdatetime",
|
|
@@ -262,16 +426,19 @@ const ea = /* @__PURE__ */ me({
|
|
|
262
426
|
menu: {
|
|
263
427
|
insert: {
|
|
264
428
|
title: "插入",
|
|
265
|
-
items: "localImage localAudio localVideo |
|
|
429
|
+
items: "localImage localAudio localVideo | template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"
|
|
266
430
|
}
|
|
267
431
|
},
|
|
268
432
|
toolbar_mode: "sliding",
|
|
269
433
|
// 工具栏
|
|
270
|
-
toolbar: "undo redo | bold italic underline strikethrough | fontfamily fontsize styles | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | localImage localAudio localVideo
|
|
434
|
+
toolbar: "undo redo | bold italic underline strikethrough | fontfamily fontsize styles | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | localImage localAudio localVideo anchor | ltr rtl",
|
|
271
435
|
// 改动后刷新,不再弹 alert
|
|
272
436
|
autosave_ask_before_unload: !1,
|
|
273
|
-
|
|
274
|
-
|
|
437
|
+
content_style: 'img {max-width:100%;}video {max-width: 100%;}body { font-family:Helvetica,Arial,sans-serif; font-size:16px }div[data-mce-bogus="all"] .mce-object-audio { display: none }div[data-mce-bogus="all"] .mce-object-video { display: none }audio::-webkit-media-controls { overflow: hidden !important }audio::-webkit-media-controls-enclosure { width: calc(100% + 32px); margin-left: auto; }audio { border-radius: 50px; }video::-webkit-media-controls { overflow: hidden !important }video::-webkit-media-controls-enclosure { width: calc(100% + 42px); margin-left: auto; }video::-webkit-media-controls-timeline { width: calc(100% - 70px); }',
|
|
438
|
+
media_poster: !1,
|
|
439
|
+
media_alt_source: !1,
|
|
440
|
+
// 取消媒体宽高设置
|
|
441
|
+
media_dimensions: !1,
|
|
275
442
|
// 字体大小
|
|
276
443
|
font_size_formats: "8px 10px 12px 14px 16px 18px 20px 22px 24px 26px 28px 30px 32px 34px 36px 38px",
|
|
277
444
|
font_size_input_default_unit: "px",
|
|
@@ -280,200 +447,169 @@ const ea = /* @__PURE__ */ me({
|
|
|
280
447
|
relative_urls: !1,
|
|
281
448
|
convert_urls: !1,
|
|
282
449
|
paste_webkit_styles: "all",
|
|
283
|
-
paste_data_images: !
|
|
450
|
+
paste_data_images: !1,
|
|
451
|
+
images_file_types: ((o = s.value.allowedType) == null ? void 0 : o.join(",")) || "jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",
|
|
284
452
|
// 粘贴前处理
|
|
285
|
-
paste_preprocess(t,
|
|
286
|
-
|
|
287
|
-
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 = U.value) == null || i.call(U, t, e);
|
|
288
|
-
},
|
|
289
|
-
// 粘贴后处理(处理异步操作)
|
|
290
|
-
paste_postprocess(t, e) {
|
|
291
|
-
var n;
|
|
292
|
-
const i = e.node;
|
|
293
|
-
$(i), (n = V.value) == null || n.call(V, t, e);
|
|
294
|
-
},
|
|
295
|
-
images_upload_handler(t) {
|
|
296
|
-
return new Promise(async (e, i) => {
|
|
297
|
-
var D, W, B, R;
|
|
298
|
-
const n = he.service({ text: "上传中" });
|
|
299
|
-
let u = t.blob();
|
|
300
|
-
const h = t.filename(), p = await O(u, {
|
|
301
|
-
imageMaxSize: a.imageMaxSize,
|
|
302
|
-
imageAllowedMineType: a.imageAllowedMineType,
|
|
303
|
-
imageMinWidth: a.imageMinWidth,
|
|
304
|
-
imageMinHeight: a.imageMinHeight,
|
|
305
|
-
imageMaxWidth: a.imageMaxWidth,
|
|
306
|
-
imageMaxHeight: a.imageMaxHeight
|
|
307
|
-
});
|
|
308
|
-
if (!p.success) {
|
|
309
|
-
if (n == null || n.close(), (D = p.error) != null && D.size)
|
|
310
|
-
return i({ message: `请上传大小不超过${a.imageMaxSize}M的图片`, remove: !0 });
|
|
311
|
-
if ((W = p.error) != null && W.format)
|
|
312
|
-
return i({ message: `请上传格式为${a.imageAllowedType.map((ue) => ue.toUpperCase()).join("、")}的图片`, remove: !0 });
|
|
313
|
-
if ((B = p.error) != null && B.pixel)
|
|
314
|
-
return i({ message: `请上传像素不低于${a.imageMinWidth}*${a.imageMinHeight}且像素不高于${a.imageMaxWidth}*${a.imageMaxHeight}的图片`, remove: !0 });
|
|
315
|
-
}
|
|
316
|
-
const f = await I(u);
|
|
317
|
-
if (!f.success)
|
|
318
|
-
return n == null || n.close(), i({ message: f == null ? void 0 : f.errorMessage, remove: !0 });
|
|
319
|
-
if (!g.value)
|
|
320
|
-
return n == null || n.close(), i({ message: "缺少图片上传配置", remove: !0 });
|
|
321
|
-
const w = await ((R = g.value) == null ? void 0 : R.call(g, f.file, h, { extParameters: a.extParameters }));
|
|
322
|
-
if (!w.success)
|
|
323
|
-
return n == null || n.close(), i({ message: w.errorMessage, remove: !0 });
|
|
324
|
-
n == null || n.close(), e(w.url);
|
|
325
|
-
});
|
|
453
|
+
paste_preprocess(t, r) {
|
|
454
|
+
r == null || r.preventDefault();
|
|
326
455
|
},
|
|
327
456
|
setup(t) {
|
|
328
|
-
|
|
457
|
+
var l, d;
|
|
458
|
+
const r = () => {
|
|
459
|
+
B.value.dialogVisible = !0, setTimeout(() => {
|
|
460
|
+
var v, c;
|
|
461
|
+
const f = (v = document == null ? void 0 : document.querySelector) == null ? void 0 : v.call(document, ".tinymce-editor-upload-image-dialog .el-upload__text > div");
|
|
462
|
+
f && (f.innerHTML = ((c = s.value) == null ? void 0 : c.tipText) || "上传");
|
|
463
|
+
});
|
|
464
|
+
};
|
|
465
|
+
if (t.ui.registry.addMenuItem("localImage", {
|
|
329
466
|
text: "图片",
|
|
330
467
|
icon: "image",
|
|
331
|
-
onAction: () =>
|
|
332
|
-
c.value.dialogVisible = !0, setTimeout(() => {
|
|
333
|
-
var i;
|
|
334
|
-
const e = (i = document == null ? void 0 : document.querySelector) == null ? void 0 : i.call(document, ".tinymce-editor-upload-image-dialog .el-upload__text > div");
|
|
335
|
-
e && (e.innerHTML = a.imageUploadTip || "上传");
|
|
336
|
-
});
|
|
337
|
-
}
|
|
468
|
+
onAction: () => r()
|
|
338
469
|
}), t.ui.registry.addButton("localImage", {
|
|
339
470
|
icon: "image",
|
|
340
471
|
tooltip: "图片",
|
|
341
|
-
onAction: () =>
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}), a.audioEnable && (t.ui.registry.addMenuItem("localAudio", {
|
|
349
|
-
text: "音频",
|
|
350
|
-
icon: "arrow-right",
|
|
351
|
-
onAction: () => {
|
|
352
|
-
r.value.dialogVisible = !0, setTimeout(() => {
|
|
353
|
-
var i;
|
|
354
|
-
const e = (i = document == null ? void 0 : document.querySelector) == null ? void 0 : i.call(document, ".tinymce-editor-upload-audio-dialog .el-upload__text > div");
|
|
355
|
-
e && (e.innerHTML = a.imageUploadTip || "上传");
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
}), t.ui.registry.addButton("localAudio", {
|
|
359
|
-
icon: "arrow-right",
|
|
360
|
-
tooltip: "音频",
|
|
361
|
-
onAction: () => {
|
|
362
|
-
r.value.dialogVisible = !0, setTimeout(() => {
|
|
363
|
-
var i;
|
|
364
|
-
const e = (i = document == null ? void 0 : document.querySelector) == null ? void 0 : i.call(document, ".tinymce-editor-upload-audio-dialog .el-upload__text > div");
|
|
365
|
-
e && (e.innerHTML = a.imageUploadTip || "上传");
|
|
472
|
+
onAction: () => r()
|
|
473
|
+
}), (l = b == null ? void 0 : b.value) != null && l.enable) {
|
|
474
|
+
const f = () => {
|
|
475
|
+
w.value.dialogVisible = !0, setTimeout(() => {
|
|
476
|
+
var c, S;
|
|
477
|
+
const v = (c = document == null ? void 0 : document.querySelector) == null ? void 0 : c.call(document, ".tinymce-editor-upload-audio-dialog .el-upload__text > div");
|
|
478
|
+
v && (v.innerHTML = ((S = s.value) == null ? void 0 : S.tipText) || "上传");
|
|
366
479
|
});
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
480
|
+
};
|
|
481
|
+
t.ui.registry.addMenuItem("localAudio", {
|
|
482
|
+
text: "音频",
|
|
483
|
+
icon: "arrow-right",
|
|
484
|
+
onAction: () => f()
|
|
485
|
+
}), t.ui.registry.addButton("localAudio", {
|
|
486
|
+
icon: "arrow-right",
|
|
487
|
+
tooltip: "音频",
|
|
488
|
+
onAction: () => f()
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
if ((d = p == null ? void 0 : p.value) != null && d.enable) {
|
|
492
|
+
const f = () => {
|
|
493
|
+
_.value.dialogVisible = !0;
|
|
494
|
+
};
|
|
495
|
+
t.ui.registry.addMenuItem("localVideo", {
|
|
496
|
+
text: "视频",
|
|
497
|
+
icon: "embed",
|
|
498
|
+
onAction: () => f()
|
|
499
|
+
}), t.ui.registry.addButton("localVideo", {
|
|
500
|
+
icon: "embed",
|
|
501
|
+
tooltip: "视频",
|
|
502
|
+
onAction: () => f()
|
|
503
|
+
});
|
|
504
|
+
}
|
|
381
505
|
}
|
|
382
|
-
},
|
|
506
|
+
}, a = $(
|
|
383
507
|
[
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
508
|
+
i.options,
|
|
509
|
+
F.options,
|
|
510
|
+
e
|
|
387
511
|
],
|
|
388
512
|
{
|
|
389
|
-
mergeFunction: (t,
|
|
390
|
-
t(...
|
|
513
|
+
mergeFunction: (t, r) => (...l) => {
|
|
514
|
+
t(...l), r(...l);
|
|
391
515
|
},
|
|
392
516
|
type: Object
|
|
393
517
|
}
|
|
394
518
|
);
|
|
395
|
-
|
|
396
|
-
var
|
|
397
|
-
t && (t.customProps = {
|
|
519
|
+
de.init(a).then(([t]) => {
|
|
520
|
+
var r;
|
|
521
|
+
t && (t.customProps = C({}, i), t.on("input", () => {
|
|
398
522
|
if (T.value) {
|
|
399
523
|
T.value = !1;
|
|
400
524
|
return;
|
|
401
525
|
}
|
|
402
|
-
|
|
403
|
-
}),
|
|
526
|
+
h.value = !0, n("input", t.getContent());
|
|
527
|
+
}), t.on("change", () => {
|
|
528
|
+
n("input", t.getContent());
|
|
529
|
+
}), t.on("paste", (l) => {
|
|
530
|
+
oe(l);
|
|
531
|
+
}), t.on("drop", (l) => {
|
|
532
|
+
te(l);
|
|
533
|
+
}), (r = i.initComplete) == null || r.call(i, { editorIns: t }), m.value = t);
|
|
404
534
|
});
|
|
535
|
+
}), $e(() => {
|
|
536
|
+
var e, a, o, t;
|
|
537
|
+
(e = m.value) == null || e.off("input"), (a = m.value) == null || a.off("paste"), (o = m.value) == null || o.off("drop"), (t = m.value) == null || t.destroy();
|
|
405
538
|
});
|
|
406
|
-
const
|
|
407
|
-
var
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
539
|
+
const xe = () => {
|
|
540
|
+
var a, o;
|
|
541
|
+
const e = C({}, w.value.additionalData || {});
|
|
542
|
+
return ((o = (a = b.value) == null ? void 0 : a.data) == null ? void 0 : o.call(a, j(C({}, e), { extParameters: i.extParameters }))) || {};
|
|
543
|
+
}, we = () => {
|
|
544
|
+
var a, o;
|
|
545
|
+
const e = C({}, w.value.additionalData || {});
|
|
546
|
+
return ((o = (a = b.value) == null ? void 0 : a.headers) == null ? void 0 : o.call(a, j(C({}, e), { extParameters: i.extParameters }))) || {};
|
|
547
|
+
}, be = (e, a, o) => {
|
|
548
|
+
var r, l;
|
|
549
|
+
const t = (l = (r = b == null ? void 0 : b.value) == null ? void 0 : r.handlerResponse) == null ? void 0 : l.call(r, e);
|
|
550
|
+
t != null && t.url ? o[o.length - 1].url = t.url : t != null && t.errorMessage && (g.error(t.errorMessage), o.splice(o.length - 1, 1)), w.value.formData.file = o;
|
|
551
|
+
}, ye = (e, a) => new Promise((o, t) => {
|
|
552
|
+
var l, d, f, v, c, S;
|
|
553
|
+
const r = e.name.split(".").filter(Boolean).pop() ? e.name.split(".").filter(Boolean).pop() : "";
|
|
554
|
+
if (!((d = (l = b.value) == null ? void 0 : l.allowedType) != null && d.includes(r.toLowerCase()))) {
|
|
555
|
+
g.error(`请上传格式为${(v = (f = b.value) == null ? void 0 : f.allowedType) == null ? void 0 : v.map((z) => z.toUpperCase()).join("、")}的音频`), t();
|
|
420
556
|
return;
|
|
421
557
|
}
|
|
422
|
-
if (
|
|
423
|
-
|
|
558
|
+
if (e.size > (((c = b.value) == null ? void 0 : c.maxSize) || 0) * 1024 * 1024) {
|
|
559
|
+
g.error(`请上传${((S = b.value) == null ? void 0 : S.maxSize) || 0}M内的音频`), t();
|
|
424
560
|
return;
|
|
425
561
|
}
|
|
426
|
-
|
|
427
|
-
}),
|
|
428
|
-
|
|
429
|
-
},
|
|
430
|
-
|
|
431
|
-
},
|
|
432
|
-
var
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
562
|
+
w.value.additionalData = { file: e }, o(!0);
|
|
563
|
+
}), _e = (e, a) => {
|
|
564
|
+
w.value.formData.file = a;
|
|
565
|
+
}, De = (e, a, o) => {
|
|
566
|
+
g.error("上传发生错误,请重试!"), w.value.formData.file = o;
|
|
567
|
+
}, Ae = () => {
|
|
568
|
+
var a, o;
|
|
569
|
+
const e = C({}, _.value.additionalData || {});
|
|
570
|
+
return ((o = (a = p.value) == null ? void 0 : a.data) == null ? void 0 : o.call(a, j(C({}, e), { extParameters: i.extParameters }))) || {};
|
|
571
|
+
}, Te = () => {
|
|
572
|
+
var a, o;
|
|
573
|
+
const e = C({}, _.value.additionalData || {});
|
|
574
|
+
return ((o = (a = p.value) == null ? void 0 : a.headers) == null ? void 0 : o.call(a, j(C({}, e), { extParameters: i.extParameters }))) || {};
|
|
575
|
+
}, Ce = (e, a, o) => {
|
|
576
|
+
var r, l;
|
|
577
|
+
const t = (l = (r = p == null ? void 0 : p.value) == null ? void 0 : r.handlerResponse) == null ? void 0 : l.call(r, e);
|
|
578
|
+
t != null && t.url ? o[o.length - 1].url = t.url : t != null && t.errorMessage && (g.error(t.errorMessage), o.splice(o.length - 1, 1)), _.value.formData.file = o;
|
|
579
|
+
}, Pe = (e, a) => new Promise((o, t) => {
|
|
580
|
+
var l, d, f, v, c, S;
|
|
581
|
+
const r = e.name.split(".").filter(Boolean).pop() ? e.name.split(".").filter(Boolean).pop() : "";
|
|
582
|
+
if (!((d = (l = p == null ? void 0 : p.value) == null ? void 0 : l.allowedType) != null && d.includes(r.toLowerCase()))) {
|
|
583
|
+
g.error(`请上传格式为${(v = (f = p == null ? void 0 : p.value) == null ? void 0 : f.allowedType) == null ? void 0 : v.map((z) => z.toUpperCase()).join("、")}的视频`), t();
|
|
445
584
|
return;
|
|
446
585
|
}
|
|
447
|
-
if (
|
|
448
|
-
|
|
586
|
+
if (e.size > (((c = p == null ? void 0 : p.value) == null ? void 0 : c.maxSize) || 0) * 1024 * 1024) {
|
|
587
|
+
g.error(`请上传${((S = p == null ? void 0 : p.value) == null ? void 0 : S.maxSize) || 0}M内的视频`), t();
|
|
449
588
|
return;
|
|
450
589
|
}
|
|
451
|
-
|
|
452
|
-
}),
|
|
453
|
-
|
|
454
|
-
},
|
|
455
|
-
|
|
590
|
+
_.value.additionalData = { file: e }, o(!0);
|
|
591
|
+
}), Se = (e, a) => {
|
|
592
|
+
_.value.formData.file = a;
|
|
593
|
+
}, Me = (e, a, o) => {
|
|
594
|
+
g.error("上传发生错误,请重试!"), _.value.formData.file = o;
|
|
456
595
|
};
|
|
457
|
-
return
|
|
458
|
-
var
|
|
459
|
-
(
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
(l = (o = d.value) == null ? void 0 : o.mode) == null || l.set(a.disabled ? "readonly" : "design");
|
|
463
|
-
}, { immediate: !0 }), E(
|
|
464
|
-
() => [a.value, a.modelValue, d.value],
|
|
596
|
+
return O(() => [i.disabled, m.value], () => {
|
|
597
|
+
var e, a;
|
|
598
|
+
(a = (e = m.value) == null ? void 0 : e.mode) == null || a.set(i.disabled ? "readonly" : "design");
|
|
599
|
+
}, { immediate: !0 }), O(
|
|
600
|
+
() => [i.value, m.value],
|
|
465
601
|
() => {
|
|
466
|
-
var o;
|
|
467
|
-
if (
|
|
468
|
-
|
|
602
|
+
var e, a, o, t;
|
|
603
|
+
if (h.value) {
|
|
604
|
+
h.value = !1;
|
|
469
605
|
return;
|
|
470
606
|
}
|
|
471
|
-
T.value = !0, (
|
|
607
|
+
T.value = !0, (e = m.value) == null || e.setContent(i.value ? i.value : ""), (o = m.value) == null || o.selection.select((a = m.value) == null ? void 0 : a.getBody(), !0), (t = m.value) == null || t.selection.collapse(!1);
|
|
472
608
|
},
|
|
473
609
|
{ immediate: !0 }
|
|
474
|
-
), { __sfc: !0, insRef:
|
|
610
|
+
), { __sfc: !0, defaultImageUploadOptions: I, defaultVideoUploadOptions: M, defaultAudioUploadOptions: P, props: i, emits: n, insRef: k, editorRef: m, preventSettingContent: h, preventUpdatingModelValue: T, uploadLoadingConfig: A, mergeImageUploadOptions: s, mergeVideoUploadOptions: p, mergeAudioUploadOptions: b, mergeImgPondOptions: L, imgPondAccept: ce, uploadImageImgPondRef: R, audioImageImgPondRef: W, uploadImage: B, uploadImageFormRef: J, onUploadImageClose: K, onUploadImageConfirm: pe, uploadAudio: w, uploadAudioFormRef: Q, onUploadAudioClose: Y, onUploadAudioConfirm: fe, uploadVideo: _, uploadVideoFormRef: Z, onUploadVideoClose: ee, onUploadVideoConfirm: ve, onImageUploadUploadExceed: ge, imageUploadTempFiles: H, onImageUploadUpload: he, uploadPasteOrDropFile: ae, handleDataTransfer: G, onValuePaste: oe, onValueDrop: te, getUploadAudioData: xe, getUploadAudioHeaders: we, onUploadAudioSuccess: be, onUploadAudioBeforeUpload: ye, onUploadAudioRemove: _e, onUploadAudioError: De, getUploadVideoData: Ae, getUploadVideoHeaders: Te, onUploadVideoSuccess: Ce, onUploadVideoBeforeUpload: Pe, onUploadVideoRemove: Se, onUploadVideoError: Me, ImgPond: Ne };
|
|
475
611
|
}
|
|
476
612
|
});
|
|
477
613
|
export {
|
|
478
|
-
|
|
614
|
+
Va as default
|
|
479
615
|
};
|