@keyblade/tinymce-editor-vue2 0.0.12-alpha.9 → 0.1.1
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 +134 -119
- package/es/editor.vue.d.ts +25 -219
- package/es/editor.vue.js +20 -19
- package/es/editor.vue2.js +430 -294
- 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 +95 -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 Ee = Object.defineProperty, He = Object.defineProperties;
|
|
2
|
+
var qe = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var ne = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ve = Object.prototype.hasOwnProperty, je = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var se = (m, n) => (n = Symbol[m]) ? n : Symbol.for("Symbol." + m);
|
|
6
|
+
var ue = (m, n, i) => n in m ? Ee(m, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : m[n] = i, P = (m, n) => {
|
|
7
|
+
for (var i in n || (n = {}))
|
|
8
|
+
Ve.call(n, i) && ue(m, i, n[i]);
|
|
9
|
+
if (ne)
|
|
10
|
+
for (var i of ne(n))
|
|
11
|
+
je.call(n, i) && ue(m, i, n[i]);
|
|
12
|
+
return m;
|
|
13
|
+
}, j = (m, n) => He(m, qe(n));
|
|
14
|
+
var L = (m, n, i) => new Promise((k, I) => {
|
|
15
|
+
var S = (x) => {
|
|
16
|
+
try {
|
|
17
|
+
d(i.next(x));
|
|
18
|
+
} catch (C) {
|
|
19
|
+
I(C);
|
|
20
|
+
}
|
|
21
|
+
}, z = (x) => {
|
|
22
|
+
try {
|
|
23
|
+
d(i.throw(x));
|
|
24
|
+
} catch (C) {
|
|
25
|
+
I(C);
|
|
26
|
+
}
|
|
27
|
+
}, d = (x) => x.done ? k(x.value) : Promise.resolve(x.value).then(S, z);
|
|
28
|
+
d((i = i.apply(m, n)).next());
|
|
29
|
+
});
|
|
30
|
+
var K = (m, n, i) => (n = m[se("asyncIterator")]) ? n.call(m) : (m = m[se("iterator")](), n = {}, i = (k, I) => (I = m[k]) && (n[k] = (S) => new Promise((z, d, x) => (S = I.call(m, S), x = S.done, Promise.resolve(S.value).then((C) => z({ value: C, done: x }), d)))), i("next"), i("return"), n);
|
|
31
|
+
import { defineComponent as $e, ref as y, computed as $, watch as O, onMounted as Fe, onUnmounted as Re } from "vue";
|
|
32
|
+
import { oneTravelImgPondBeforeAddFile as me, oneTravelImageCompressor as de, oneTravelImageCheckAndTransform as We } from "@keyblade/one-travel";
|
|
33
|
+
import { blobToFile as ce, getImagePixel as Ne, getFileExtension as Le } from "./util.js";
|
|
34
|
+
import "./style.less.js";
|
|
35
|
+
import Oe from "imgpond";
|
|
36
|
+
import { conclude as F } from "vue-global-config";
|
|
37
|
+
import pe from "tinymce";
|
|
38
|
+
import Ge 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 R } from "./index.js";
|
|
70
|
+
import { Message as g } from "element-ui";
|
|
71
|
+
const Ha = /* @__PURE__ */ $e({
|
|
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(m, { emit: n }) {
|
|
86
|
+
const i = m;
|
|
87
|
+
pe.addI18n("zh_CN", Ge);
|
|
88
|
+
const k = {
|
|
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
|
+
}, I = {
|
|
98
|
+
enable: !0,
|
|
99
|
+
maxSize: 300,
|
|
100
|
+
allowedType: ["avi", "wmv", "mp4", "mov", "3gp"],
|
|
101
|
+
accept: ".avi,.wmv,.mp4,.mov,.3gp"
|
|
102
|
+
}, S = {
|
|
103
|
+
enable: !0,
|
|
104
|
+
maxSize: 200,
|
|
105
|
+
allowedType: ["wav", "mp3", "mp4", "m4a", "wma", "aac"],
|
|
106
|
+
accept: ".wav,.mp3,.mp4,.m4a,.wma,.aac"
|
|
107
|
+
}, z = y(), d = y(), x = y(!1), C = y(!1), T = y({
|
|
108
|
+
show: !1,
|
|
109
|
+
text: "图片上传中,请稍等"
|
|
110
|
+
}), s = $(() => F([i.imageUploadOptions, R.imageUploadOptions, k]) || {}), u = $(() => F([i.videoUploadOptions, R.videoUploadOptions, I]) || {}), h = $(() => F([i.audioUploadOptions, R.audioUploadOptions, S]) || {}), G = $(() => F([i.imgPondOptions, R.imgPondOptions]) || {}), fe = $(() => {
|
|
111
|
+
var e, a;
|
|
112
|
+
return ((a = (e = s == null ? void 0 : s.value) == null ? void 0 : e.allowedType) == null ? void 0 : a.map((t) => `.${t}`).join(",")) || "";
|
|
113
|
+
}), W = y();
|
|
114
|
+
O(() => W.value, () => {
|
|
115
|
+
W.value && me(W.value, {
|
|
116
|
+
onStart: () => {
|
|
117
|
+
T.value = {
|
|
118
|
+
show: !0,
|
|
119
|
+
text: "图片加载中,请稍等"
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
onSuccess: () => {
|
|
123
|
+
T.value.show = !1;
|
|
124
|
+
},
|
|
125
|
+
onError: (e) => {
|
|
126
|
+
T.value.show = !1, g.error({ message: e, customClass: "tinymce-editor-message", duration: 3e3 });
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}, { immediate: !0 });
|
|
130
|
+
const N = y();
|
|
131
|
+
O(() => N.value, () => {
|
|
132
|
+
N.value && me(N.value, {
|
|
133
|
+
onStart: () => {
|
|
134
|
+
T.value = {
|
|
135
|
+
show: !0,
|
|
136
|
+
text: "图片加载中,请稍等"
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
onSuccess: () => {
|
|
140
|
+
T.value.show = !1;
|
|
141
|
+
},
|
|
142
|
+
onError: (e) => {
|
|
143
|
+
T.value.show = !1, g.error(e);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}, { immediate: !0 });
|
|
147
|
+
const E = y({
|
|
73
148
|
dialogVisible: !1,
|
|
74
149
|
formData: {
|
|
75
150
|
images: []
|
|
76
151
|
}
|
|
77
|
-
}),
|
|
78
|
-
|
|
152
|
+
}), Q = y(), Y = () => {
|
|
153
|
+
H = [], E.value.dialogVisible = !1, E.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
|
+
}, ve = () => {
|
|
157
|
+
var e;
|
|
158
|
+
H = [], (e = Q.value) == null || e.validate((a) => {
|
|
159
|
+
a && (E.value.formData.images.forEach((t) => {
|
|
160
|
+
var r;
|
|
161
|
+
let o = t;
|
|
162
|
+
G.value.srcAt && (o = (t == null ? void 0 : t[G.value.srcAt]) || ""), (r = d.value) == null || r.insertContent(`<img src=${o} alt="" />`);
|
|
163
|
+
}), Y());
|
|
90
164
|
});
|
|
91
|
-
},
|
|
165
|
+
}, b = 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
|
+
}), Z = y(), ee = () => {
|
|
178
|
+
b.value.dialogVisible = !1, b.value.formData = {
|
|
115
179
|
name: "",
|
|
116
180
|
cover: [],
|
|
117
181
|
file: []
|
|
118
|
-
},
|
|
119
|
-
},
|
|
182
|
+
}, b.value.additionalData = {};
|
|
183
|
+
}, ge = () => {
|
|
184
|
+
var e;
|
|
185
|
+
(e = Z.value) == null || e.validate((a) => {
|
|
186
|
+
var t, o;
|
|
187
|
+
a && ((o = d.value) == null || o.insertContent(`<audio controls controlslist="nodownload noplaybackrate" data-name="${b.value.formData.name}" data-poster="${b.value.formData.cover[0]}" src="${(t = b.value.formData.file[0]) == null ? void 0 : t.url}"></audio>`), ee());
|
|
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
|
+
}), ae = y(), te = () => {
|
|
198
|
+
_.value.dialogVisible = !1, _.value.formData = {
|
|
137
199
|
file: []
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
var
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
200
|
+
}, _.value.additionalData = {};
|
|
201
|
+
}, he = () => {
|
|
202
|
+
var e;
|
|
203
|
+
(e = ae.value) == null || e.validate((a) => {
|
|
204
|
+
var t, o;
|
|
205
|
+
a && ((o = d.value) == null || o.insertContent(`<video width="auto" height="auto" controls src="${(t = _.value.formData.file[0]) == null ? void 0 : t.url}"></video>`), te());
|
|
206
|
+
});
|
|
207
|
+
}, xe = () => {
|
|
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 we = (e, a) => new Promise((t, o) => L(this, null, function* () {
|
|
214
|
+
var f, v;
|
|
215
|
+
if (H.find((p) => (p == null ? void 0 : p.uid) === (e == null ? void 0 : e.uid)))
|
|
216
|
+
return setTimeout(() => {
|
|
217
|
+
document.querySelectorAll(".swal2-container").forEach((p) => {
|
|
218
|
+
p == null || p.remove();
|
|
219
|
+
});
|
|
220
|
+
}), o("");
|
|
221
|
+
H.push(e);
|
|
222
|
+
const l = yield de(e);
|
|
223
|
+
if (!l.success) {
|
|
224
|
+
o(), setTimeout(() => {
|
|
225
|
+
a.onError(l.errorMessage);
|
|
153
226
|
});
|
|
154
227
|
return;
|
|
155
228
|
}
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
158
|
-
|
|
159
|
-
|
|
229
|
+
const c = yield (v = (f = s.value).handleRequest) == null ? void 0 : v.call(f, ce(l.file, e.name), e.name, { extParameters: i.extParameters });
|
|
230
|
+
if (!c || !(c != null && c.success)) {
|
|
231
|
+
o(), setTimeout(() => {
|
|
232
|
+
a.onError(c == null ? void 0 : c.errorMessage);
|
|
160
233
|
});
|
|
161
234
|
return;
|
|
162
235
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
236
|
+
t(c.url);
|
|
237
|
+
}));
|
|
238
|
+
function oe(e) {
|
|
239
|
+
return L(this, null, function* () {
|
|
240
|
+
var c, f, v;
|
|
241
|
+
let a = e;
|
|
242
|
+
if (!((c = s.value) != null && c.handleRequest)) {
|
|
243
|
+
g.error("缺少图片上传配置");
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
let t = 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 o = yield We(a, t, {
|
|
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 (!o.success) {
|
|
261
|
+
g.error((o == null ? void 0 : o.errorMessage) || "");
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (o.hasTransform) {
|
|
265
|
+
a = o.file;
|
|
266
|
+
const p = t == null ? void 0 : t.split(".");
|
|
267
|
+
p.pop(), t = `${p.join(",")}.jpg`;
|
|
268
|
+
}
|
|
269
|
+
const r = yield de(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, ce(r.file, t), t, { 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 X = (e) => L(this, null, function* () {
|
|
283
|
+
var l, c, D;
|
|
284
|
+
const a = d.value, t = e.types;
|
|
285
|
+
if (t.includes("text/html")) {
|
|
286
|
+
const U = e.getData("text/html"), B = new DOMParser().parseFromString(U, "text/html"), le = Array.from(B.body.querySelectorAll("img")), ke = Array.from(B.body.querySelectorAll("audio")), ze = Array.from(B.body.querySelectorAll("video"));
|
|
287
|
+
le.length > 0 && (T.value = {
|
|
288
|
+
show: !0,
|
|
289
|
+
text: "图片加载中,请稍等"
|
|
290
|
+
});
|
|
291
|
+
for (const A of [...ke, ...ze])
|
|
292
|
+
A == null || A.remove();
|
|
293
|
+
try {
|
|
294
|
+
for (var f = K([...le]), v, p, M; v = !(p = yield f.next()).done; v = !1) {
|
|
295
|
+
const A = p.value;
|
|
296
|
+
if (A.removeAttribute("crossorigin"), A.src.startsWith("http"))
|
|
297
|
+
if ((l = s.value) != null && l.handleRequestByUrl) {
|
|
298
|
+
const w = yield (c = s.value) == null ? void 0 : c.handleRequestByUrl(A.src, { extParameters: i.extParameters });
|
|
299
|
+
w != null && w.success && (w != null && w.url) ? A.src = w == null ? void 0 : w.url : A.remove();
|
|
300
|
+
} else {
|
|
301
|
+
const w = yield Ne(A.src);
|
|
302
|
+
w && (w.width < (s.value.minWidth || 0) && w.height < (s.value.minHeight || 0) || w.width > (s.value.maxWidth || 0) && w.height > (s.value.maxHeight || 0)) && A.remove();
|
|
303
|
+
}
|
|
304
|
+
else
|
|
305
|
+
A.remove(), g.error("不支持Word中批量复制图片或视频,请改为单个复制,或者从工具栏中手动插入上传");
|
|
306
|
+
}
|
|
307
|
+
} catch (p) {
|
|
308
|
+
M = [p];
|
|
309
|
+
} finally {
|
|
310
|
+
try {
|
|
311
|
+
v && (p = f.return) && (yield p.call(f));
|
|
312
|
+
} finally {
|
|
313
|
+
if (M)
|
|
314
|
+
throw M[0];
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
T.value.show = !1;
|
|
318
|
+
const Be = new XMLSerializer().serializeToString(B.body);
|
|
319
|
+
a.insertContent(Be);
|
|
320
|
+
} else
|
|
321
|
+
t.includes("text/plain") && a.insertContent(e.getData("text/plain"));
|
|
322
|
+
const o = Array.from((e == null ? void 0 : e.files) || []), r = [];
|
|
323
|
+
for (const U of o) {
|
|
324
|
+
if (!U)
|
|
325
|
+
continue;
|
|
326
|
+
const V = Le(U.name);
|
|
327
|
+
U.type.indexOf("image") > -1 || (D = s.value.allowedType) != null && D.includes(V.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
|
+
T.value = {
|
|
331
|
+
show: !0,
|
|
332
|
+
text: "图片上传中,请稍等"
|
|
333
|
+
};
|
|
334
|
+
try {
|
|
335
|
+
for (var q = K(r), J, ja, $a; J = !(ja = yield q.next()).done; J = !1) {
|
|
336
|
+
const U = ja.value;
|
|
337
|
+
const V = yield oe(U);
|
|
338
|
+
if (V) {
|
|
339
|
+
const B = `<img src="${V}" alt="" />`;
|
|
340
|
+
a.insertContent(B);
|
|
341
|
+
}
|
|
182
342
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
343
|
+
} catch (ja) {
|
|
344
|
+
$a = [ja];
|
|
345
|
+
} finally {
|
|
346
|
+
try {
|
|
347
|
+
J && (ja = q.return) && (yield ja.call(q));
|
|
348
|
+
} finally {
|
|
349
|
+
if ($a)
|
|
350
|
+
throw $a[0];
|
|
187
351
|
}
|
|
188
352
|
}
|
|
353
|
+
T.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
|
+
}), ie = (e) => {
|
|
357
|
+
var t;
|
|
358
|
+
e.preventDefault();
|
|
359
|
+
const a = e.clipboardData || ((t = e == null ? void 0 : e.originalEvent) == null ? void 0 : t.clipboardData);
|
|
360
|
+
X(a);
|
|
361
|
+
}, re = (e) => {
|
|
362
|
+
var t;
|
|
363
|
+
e.preventDefault();
|
|
364
|
+
const a = e.dataTransfer || ((t = e == null ? void 0 : e.originalEvent) == null ? void 0 : t.dataTransfer);
|
|
365
|
+
X(a);
|
|
366
|
+
};
|
|
367
|
+
Fe(() => {
|
|
368
|
+
var t;
|
|
369
|
+
const e = {
|
|
206
370
|
// 设置语言
|
|
207
371
|
language: "zh_CN",
|
|
208
372
|
// 实例
|
|
209
|
-
target:
|
|
373
|
+
target: z.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: ((t = s.value.allowedType) == null ? void 0 : t.join(",")) || "jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",
|
|
284
452
|
// 粘贴前处理
|
|
285
|
-
paste_preprocess(
|
|
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);
|
|
453
|
+
paste_preprocess(o, r) {
|
|
454
|
+
r == null || r.preventDefault();
|
|
288
455
|
},
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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
|
|
456
|
+
setup(o) {
|
|
457
|
+
var l, c;
|
|
458
|
+
const r = () => {
|
|
459
|
+
E.value.dialogVisible = !0, setTimeout(() => {
|
|
460
|
+
var v, p;
|
|
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 = ((p = s.value) == null ? void 0 : p.tipText) || "上传");
|
|
307
463
|
});
|
|
308
|
-
|
|
309
|
-
|
|
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
|
-
});
|
|
326
|
-
},
|
|
327
|
-
setup(t) {
|
|
328
|
-
t.ui.registry.addMenuItem("localImage", {
|
|
464
|
+
};
|
|
465
|
+
if (o.ui.registry.addMenuItem("localImage", {
|
|
329
466
|
text: "图片",
|
|
330
467
|
icon: "image",
|
|
331
|
-
onAction: () =>
|
|
332
|
-
|
|
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
|
-
}
|
|
338
|
-
}), t.ui.registry.addButton("localImage", {
|
|
468
|
+
onAction: () => r()
|
|
469
|
+
}), o.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 = h == null ? void 0 : h.value) != null && l.enable) {
|
|
474
|
+
const f = () => {
|
|
475
|
+
b.value.dialogVisible = !0, setTimeout(() => {
|
|
476
|
+
var p, M;
|
|
477
|
+
const v = (p = document == null ? void 0 : document.querySelector) == null ? void 0 : p.call(document, ".tinymce-editor-upload-audio-dialog .el-upload__text > div");
|
|
478
|
+
v && (v.innerHTML = ((M = s.value) == null ? void 0 : M.tipText) || "上传");
|
|
366
479
|
});
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
480
|
+
};
|
|
481
|
+
o.ui.registry.addMenuItem("localAudio", {
|
|
482
|
+
text: "音频",
|
|
483
|
+
icon: "arrow-right",
|
|
484
|
+
onAction: () => f()
|
|
485
|
+
}), o.ui.registry.addButton("localAudio", {
|
|
486
|
+
icon: "arrow-right",
|
|
487
|
+
tooltip: "音频",
|
|
488
|
+
onAction: () => f()
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
if ((c = u == null ? void 0 : u.value) != null && c.enable) {
|
|
492
|
+
const f = () => {
|
|
493
|
+
_.value.dialogVisible = !0;
|
|
494
|
+
};
|
|
495
|
+
o.ui.registry.addMenuItem("localVideo", {
|
|
496
|
+
text: "视频",
|
|
497
|
+
icon: "embed",
|
|
498
|
+
onAction: () => f()
|
|
499
|
+
}), o.ui.registry.addButton("localVideo", {
|
|
500
|
+
icon: "embed",
|
|
501
|
+
tooltip: "视频",
|
|
502
|
+
onAction: () => f()
|
|
503
|
+
});
|
|
504
|
+
}
|
|
381
505
|
}
|
|
382
|
-
},
|
|
506
|
+
}, a = F(
|
|
383
507
|
[
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
508
|
+
i.options,
|
|
509
|
+
R.options,
|
|
510
|
+
e
|
|
387
511
|
],
|
|
388
512
|
{
|
|
389
|
-
mergeFunction: (
|
|
390
|
-
|
|
513
|
+
mergeFunction: (o, r) => (...l) => {
|
|
514
|
+
o(...l), r(...l);
|
|
391
515
|
},
|
|
392
516
|
type: Object
|
|
393
517
|
}
|
|
394
518
|
);
|
|
395
|
-
|
|
396
|
-
var
|
|
397
|
-
|
|
398
|
-
if (
|
|
399
|
-
|
|
519
|
+
pe.init(a).then(([o]) => {
|
|
520
|
+
var r;
|
|
521
|
+
o && (o.customProps = P({}, i), o.on("input", () => {
|
|
522
|
+
if (C.value) {
|
|
523
|
+
C.value = !1;
|
|
400
524
|
return;
|
|
401
525
|
}
|
|
402
|
-
|
|
403
|
-
}),
|
|
526
|
+
x.value = !0, n("input", o.getContent());
|
|
527
|
+
}), o.on("change", () => {
|
|
528
|
+
n("input", o.getContent());
|
|
529
|
+
}), o.on("paste", (l) => {
|
|
530
|
+
ie(l);
|
|
531
|
+
}), o.on("drop", (l) => {
|
|
532
|
+
re(l);
|
|
533
|
+
}), (r = i.initComplete) == null || r.call(i, { editorIns: o }), d.value = o);
|
|
404
534
|
});
|
|
535
|
+
}), Re(() => {
|
|
536
|
+
var e, a, t, o;
|
|
537
|
+
(e = d.value) == null || e.off("input"), (a = d.value) == null || a.off("paste"), (t = d.value) == null || t.off("drop"), (o = d.value) == null || o.destroy();
|
|
405
538
|
});
|
|
406
|
-
const
|
|
407
|
-
var
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
539
|
+
const be = () => {
|
|
540
|
+
var a, t;
|
|
541
|
+
const e = P({}, b.value.additionalData || {});
|
|
542
|
+
return ((t = (a = h.value) == null ? void 0 : a.data) == null ? void 0 : t.call(a, j(P({}, e), { extParameters: i.extParameters }))) || {};
|
|
543
|
+
}, ye = () => {
|
|
544
|
+
var a, t;
|
|
545
|
+
const e = P({}, b.value.additionalData || {});
|
|
546
|
+
return ((t = (a = h.value) == null ? void 0 : a.headers) == null ? void 0 : t.call(a, j(P({}, e), { extParameters: i.extParameters }))) || {};
|
|
547
|
+
}, _e = (e, a, t) => {
|
|
548
|
+
var r, l;
|
|
549
|
+
const o = (l = (r = h == null ? void 0 : h.value) == null ? void 0 : r.handlerResponse) == null ? void 0 : l.call(r, e);
|
|
550
|
+
o != null && o.url ? t[t.length - 1].url = o.url : o != null && o.errorMessage && (g.error(o.errorMessage), t.splice(t.length - 1, 1)), b.value.formData.file = t;
|
|
551
|
+
}, De = (e, a) => new Promise((t, o) => {
|
|
552
|
+
var l, c, f, v, p, M, D, q;
|
|
553
|
+
const r = e.name.split(".").filter(Boolean).pop() ? e.name.split(".").filter(Boolean).pop() : "";
|
|
554
|
+
if (!((c = (l = h.value) == null ? void 0 : l.allowedType) != null && c.includes(r.toLowerCase()))) {
|
|
555
|
+
g.error(`请上传格式为${(v = (f = h.value) == null ? void 0 : f.allowedType) == null ? void 0 : v.map((J) => J.toUpperCase()).join("、")}的音频`), o();
|
|
420
556
|
return;
|
|
421
557
|
}
|
|
422
|
-
if (
|
|
423
|
-
|
|
558
|
+
if (e.size > (((p = h.value) == null ? void 0 : p.maxSize) || 0) * 1024 * 1024) {
|
|
559
|
+
g.error(`请上传${((M = h.value) == null ? void 0 : M.maxSize) || 0}M内的音频`), o();
|
|
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
|
+
b.value.additionalData = { file: e }, (q = (D = h == null ? void 0 : h.value) == null ? void 0 : D.beforeUploadEnd) == null || q.call(D, e), t(!0);
|
|
563
|
+
}), Ae = (e, a) => {
|
|
564
|
+
b.value.formData.file = a;
|
|
565
|
+
}, Te = (e, a, t) => {
|
|
566
|
+
g.error("上传发生错误,请重试!"), b.value.formData.file = t;
|
|
567
|
+
}, Ce = () => {
|
|
568
|
+
var a, t;
|
|
569
|
+
const e = P({}, _.value.additionalData || {});
|
|
570
|
+
return ((t = (a = u.value) == null ? void 0 : a.data) == null ? void 0 : t.call(a, j(P({}, e), { extParameters: i.extParameters }))) || {};
|
|
571
|
+
}, Pe = () => {
|
|
572
|
+
var a, t;
|
|
573
|
+
const e = P({}, _.value.additionalData || {});
|
|
574
|
+
return ((t = (a = u.value) == null ? void 0 : a.headers) == null ? void 0 : t.call(a, j(P({}, e), { extParameters: i.extParameters }))) || {};
|
|
575
|
+
}, Se = (e, a, t) => {
|
|
576
|
+
var r, l;
|
|
577
|
+
const o = (l = (r = u == null ? void 0 : u.value) == null ? void 0 : r.handlerResponse) == null ? void 0 : l.call(r, e);
|
|
578
|
+
o != null && o.url ? t[t.length - 1].url = o.url : o != null && o.errorMessage && (g.error(o.errorMessage), t.splice(t.length - 1, 1)), _.value.formData.file = t;
|
|
579
|
+
}, Me = (e, a) => new Promise((t, o) => {
|
|
580
|
+
var l, c, f, v, p, M, D, q;
|
|
581
|
+
const r = e.name.split(".").filter(Boolean).pop() ? e.name.split(".").filter(Boolean).pop() : "";
|
|
582
|
+
if (!((c = (l = u == null ? void 0 : u.value) == null ? void 0 : l.allowedType) != null && c.includes(r.toLowerCase()))) {
|
|
583
|
+
g.error(`请上传格式为${(v = (f = u == null ? void 0 : u.value) == null ? void 0 : f.allowedType) == null ? void 0 : v.map((J) => J.toUpperCase()).join("、")}的视频`), o();
|
|
445
584
|
return;
|
|
446
585
|
}
|
|
447
|
-
if (
|
|
448
|
-
|
|
586
|
+
if (e.size > (((p = u == null ? void 0 : u.value) == null ? void 0 : p.maxSize) || 0) * 1024 * 1024) {
|
|
587
|
+
g.error(`请上传${((M = u == null ? void 0 : u.value) == null ? void 0 : M.maxSize) || 0}M内的视频`), o();
|
|
449
588
|
return;
|
|
450
589
|
}
|
|
451
|
-
|
|
452
|
-
}),
|
|
453
|
-
|
|
454
|
-
},
|
|
455
|
-
|
|
590
|
+
_.value.additionalData = { file: e }, (q = (D = u == null ? void 0 : u.value) == null ? void 0 : D.beforeUploadEnd) == null || q.call(D, e), t(!0);
|
|
591
|
+
}), Ie = (e, a) => {
|
|
592
|
+
_.value.formData.file = a;
|
|
593
|
+
}, Ue = (e, a, t) => {
|
|
594
|
+
g.error("上传发生错误,请重试!"), _.value.formData.file = t;
|
|
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, d.value], () => {
|
|
597
|
+
var e, a;
|
|
598
|
+
(a = (e = d.value) == null ? void 0 : e.mode) == null || a.set(i.disabled ? "readonly" : "design");
|
|
599
|
+
}, { immediate: !0 }), O(
|
|
600
|
+
() => [i.value, d.value],
|
|
465
601
|
() => {
|
|
466
|
-
var o;
|
|
467
|
-
if (
|
|
468
|
-
|
|
602
|
+
var e, a, t, o;
|
|
603
|
+
if (x.value) {
|
|
604
|
+
x.value = !1;
|
|
469
605
|
return;
|
|
470
606
|
}
|
|
471
|
-
|
|
607
|
+
C.value = !0, (e = d.value) == null || e.setContent(i.value ? i.value : ""), (t = d.value) == null || t.selection.select((a = d.value) == null ? void 0 : a.getBody(), !0), (o = d.value) == null || o.selection.collapse(!1);
|
|
472
608
|
},
|
|
473
609
|
{ immediate: !0 }
|
|
474
|
-
), { __sfc: !0,
|
|
610
|
+
), { __sfc: !0, defaultImageUploadOptions: k, defaultVideoUploadOptions: I, defaultAudioUploadOptions: S, props: i, emits: n, insRef: z, editorRef: d, preventSettingContent: x, preventUpdatingModelValue: C, uploadLoadingConfig: T, mergeImageUploadOptions: s, mergeVideoUploadOptions: u, mergeAudioUploadOptions: h, mergeImgPondOptions: G, imgPondAccept: fe, uploadImageImgPondRef: W, audioImageImgPondRef: N, uploadImage: E, uploadImageFormRef: Q, onUploadImageClose: Y, onUploadImageConfirm: ve, uploadAudio: b, uploadAudioFormRef: Z, onUploadAudioClose: ee, onUploadAudioConfirm: ge, uploadVideo: _, uploadVideoFormRef: ae, onUploadVideoClose: te, onUploadVideoConfirm: he, onImageUploadUploadExceed: xe, imageUploadTempFiles: H, onImageUploadUpload: we, uploadPasteOrDropFile: oe, handleDataTransfer: X, onValuePaste: ie, onValueDrop: re, getUploadAudioData: be, getUploadAudioHeaders: ye, onUploadAudioSuccess: _e, onUploadAudioBeforeUpload: De, onUploadAudioRemove: Ae, onUploadAudioError: Te, getUploadVideoData: Ce, getUploadVideoHeaders: Pe, onUploadVideoSuccess: Se, onUploadVideoBeforeUpload: Me, onUploadVideoRemove: Ie, onUploadVideoError: Ue, ImgPond: Oe };
|
|
475
611
|
}
|
|
476
612
|
});
|
|
477
613
|
export {
|
|
478
|
-
|
|
614
|
+
Ha as default
|
|
479
615
|
};
|