@npm-questionpro/wick-ui-editor 0.12.0 → 0.13.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/dist/html-Nh3KtWcE.js +2791 -0
- package/dist/index.d.ts +2 -2
- package/dist/standalone-BhI0QomE.js +2458 -0
- package/dist/style.css +1 -1
- package/dist/wick-ui-editor/es/index.js +546 -443
- package/package.json +5 -5
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEditorState as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { TaskList as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { TableKit as
|
|
10
|
-
import
|
|
11
|
-
import { TextStyle as
|
|
12
|
-
import
|
|
13
|
-
import { WuIcon as h, WuModal as
|
|
14
|
-
import { DropdownMenu as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
wuContentEditor:
|
|
18
|
-
wuContentEditorTable:
|
|
19
|
-
wuContentEditorContainer:
|
|
20
|
-
wuContentEditorToolbar:
|
|
21
|
-
wuContentEditorAction:
|
|
22
|
-
wuContentEditorDropdown:
|
|
23
|
-
wuContentEditorDropdownItem:
|
|
24
|
-
wuContentEditorFontSize:
|
|
25
|
-
wuContentEditorModal:
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsx as e, jsxs as f, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState as p, useEditor as V, EditorContent as X } from "@tiptap/react";
|
|
3
|
+
import Y from "clsx";
|
|
4
|
+
import m, { useState as D, useRef as Z, useCallback as O } from "react";
|
|
5
|
+
import Q from "@tiptap/extension-image";
|
|
6
|
+
import { TaskList as tt, TaskItem as et } from "@tiptap/extension-list";
|
|
7
|
+
import ot from "@tiptap/extension-subscript";
|
|
8
|
+
import nt from "@tiptap/extension-superscript";
|
|
9
|
+
import { TableKit as it } from "@tiptap/extension-table";
|
|
10
|
+
import rt from "@tiptap/extension-text-align";
|
|
11
|
+
import { TextStyle as st, Color as ct, BackgroundColor as lt, LineHeight as at, FontSize as dt, FontFamily as ut } from "@tiptap/extension-text-style";
|
|
12
|
+
import mt from "@tiptap/starter-kit";
|
|
13
|
+
import { WuIcon as h, WuModal as H, WuModalHeader as R, WuModalContent as M, WuInput as x, WuModalFooter as z, WuModalClose as T, WuToggle as ht, WuButton as q } from "@npm-questionpro/wick-ui-lib";
|
|
14
|
+
import { DropdownMenu as U, DropdownMenuTrigger as $, DropdownMenuContent as j, DropdownMenuItem as K } from "@radix-ui/react-dropdown-menu";
|
|
15
|
+
import gt from "dompurify";
|
|
16
|
+
const ft = "_wuContentEditor_1kxiu_8", pt = "_wuContentEditorTable_1kxiu_1", wt = "_wuContentEditorContainer_1kxiu_8", Ct = "_wuContentEditorToolbar_1kxiu_80", vt = "_wuContentEditorAction_1kxiu_107", bt = "_wuContentEditorDropdown_1kxiu_133", At = "_wuContentEditorDropdownItem_1kxiu_146", kt = "_wuContentEditorFontSize_1kxiu_157", Et = "_wuContentEditorModal_1kxiu_171", yt = "_wuCodeEditor_1kxiu_175", Tt = "_wuCodeEditorPreview_1kxiu_185", xt = "_wuCodeEditorInput_1kxiu_200", a = {
|
|
17
|
+
wuContentEditor: ft,
|
|
18
|
+
wuContentEditorTable: pt,
|
|
19
|
+
wuContentEditorContainer: wt,
|
|
20
|
+
wuContentEditorToolbar: Ct,
|
|
21
|
+
wuContentEditorAction: vt,
|
|
22
|
+
wuContentEditorDropdown: bt,
|
|
23
|
+
wuContentEditorDropdownItem: At,
|
|
24
|
+
wuContentEditorFontSize: kt,
|
|
25
|
+
wuContentEditorModal: Et,
|
|
26
|
+
wuCodeEditor: yt,
|
|
27
|
+
wuCodeEditorPreview: Tt,
|
|
28
|
+
wuCodeEditorInput: xt
|
|
29
|
+
}, St = [
|
|
30
|
+
mt.configure({
|
|
28
31
|
link: {
|
|
29
32
|
openOnClick: !1,
|
|
30
33
|
autolink: !0,
|
|
@@ -32,130 +35,130 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
32
35
|
protocols: ["http", "https"],
|
|
33
36
|
isAllowedUri: (t, n) => {
|
|
34
37
|
try {
|
|
35
|
-
const
|
|
36
|
-
if (!n.defaultValidate(
|
|
38
|
+
const o = t.includes(":") ? new URL(t) : new URL(`${n.defaultProtocol}://${t}`);
|
|
39
|
+
if (!n.defaultValidate(o.href))
|
|
37
40
|
return !1;
|
|
38
|
-
const i = ["ftp", "file", "mailto"],
|
|
39
|
-
if (i.includes(
|
|
40
|
-
(
|
|
41
|
-
).includes(
|
|
41
|
+
const i = ["ftp", "file", "mailto"], r = o.protocol.replace(":", "");
|
|
42
|
+
if (i.includes(r) || !n.protocols.map(
|
|
43
|
+
(s) => typeof s == "string" ? s : s.scheme
|
|
44
|
+
).includes(r))
|
|
42
45
|
return !1;
|
|
43
|
-
const
|
|
46
|
+
const d = [
|
|
44
47
|
"example-phishing.com",
|
|
45
48
|
"malicious-site.net"
|
|
46
|
-
],
|
|
47
|
-
return !
|
|
49
|
+
], c = o.hostname;
|
|
50
|
+
return !d.includes(c);
|
|
48
51
|
} catch {
|
|
49
52
|
return !1;
|
|
50
53
|
}
|
|
51
54
|
},
|
|
52
55
|
shouldAutoLink: (t) => {
|
|
53
56
|
try {
|
|
54
|
-
const n = t.includes(":") ? new URL(t) : new URL(`https://${t}`),
|
|
57
|
+
const n = t.includes(":") ? new URL(t) : new URL(`https://${t}`), o = [
|
|
55
58
|
"example-no-autolink.com",
|
|
56
59
|
"another-no-autolink.com"
|
|
57
60
|
], i = n.hostname;
|
|
58
|
-
return !
|
|
61
|
+
return !o.includes(i);
|
|
59
62
|
} catch {
|
|
60
63
|
return !1;
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
}),
|
|
65
|
-
|
|
68
|
+
rt.configure({
|
|
66
69
|
types: ["heading", "paragraph"]
|
|
67
70
|
}),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
nt,
|
|
72
|
+
ot,
|
|
73
|
+
st,
|
|
74
|
+
ct,
|
|
75
|
+
lt,
|
|
71
76
|
tt,
|
|
72
77
|
et,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
it,
|
|
78
|
-
K.configure({
|
|
78
|
+
at,
|
|
79
|
+
dt,
|
|
80
|
+
ut,
|
|
81
|
+
Q.configure({
|
|
79
82
|
resize: {
|
|
80
83
|
enabled: !0,
|
|
81
84
|
alwaysPreserveAspectRatio: !0
|
|
82
85
|
},
|
|
83
86
|
inline: !0
|
|
84
87
|
}),
|
|
85
|
-
|
|
88
|
+
it.configure({
|
|
86
89
|
table: { resizable: !0 }
|
|
87
90
|
})
|
|
88
|
-
],
|
|
91
|
+
], J = m.createContext(
|
|
89
92
|
null
|
|
90
|
-
),
|
|
93
|
+
), Ft = ({
|
|
91
94
|
editor: t,
|
|
92
95
|
children: n,
|
|
93
|
-
customFonts:
|
|
94
|
-
}) => /* @__PURE__ */
|
|
95
|
-
const t =
|
|
96
|
+
customFonts: o
|
|
97
|
+
}) => /* @__PURE__ */ e(J.Provider, { value: { editor: t, customFonts: o }, children: n }), g = () => {
|
|
98
|
+
const t = m.useContext(J);
|
|
96
99
|
if (!t)
|
|
97
100
|
throw new Error("useToolbar must be used within a ToolbarProvider");
|
|
98
101
|
return t;
|
|
99
|
-
},
|
|
100
|
-
var
|
|
101
|
-
const [
|
|
102
|
-
n || t.items.find((
|
|
102
|
+
}, P = ({ action: t, defaultValue: n }) => {
|
|
103
|
+
var r;
|
|
104
|
+
const [o, i] = m.useState(
|
|
105
|
+
n || t.items.find((l) => l.active) || t.items[0]
|
|
103
106
|
);
|
|
104
|
-
return
|
|
107
|
+
return m.useEffect(() => {
|
|
105
108
|
i(
|
|
106
|
-
n || t.items.find((
|
|
109
|
+
n || t.items.find((l) => l.active) || t.items[0]
|
|
107
110
|
);
|
|
108
|
-
}, [t, n]), /* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
|
|
111
|
+
}, [t, n]), /* @__PURE__ */ f(U, { children: [
|
|
112
|
+
/* @__PURE__ */ e(
|
|
113
|
+
$,
|
|
111
114
|
{
|
|
112
|
-
className:
|
|
115
|
+
className: a.wuContentEditorAction,
|
|
113
116
|
"data-active": t.active,
|
|
114
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ e(h, { icon: o.icon })
|
|
115
118
|
}
|
|
116
119
|
),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
120
|
+
/* @__PURE__ */ e(
|
|
121
|
+
j,
|
|
119
122
|
{
|
|
120
123
|
align: "start",
|
|
121
|
-
onCloseAutoFocus: (
|
|
122
|
-
className:
|
|
124
|
+
onCloseAutoFocus: (l) => l.preventDefault(),
|
|
125
|
+
className: a.wuContentEditorDropdown,
|
|
123
126
|
"data-inline": !0,
|
|
124
|
-
children: (
|
|
125
|
-
|
|
127
|
+
children: (r = t.items) == null ? void 0 : r.map((l) => /* @__PURE__ */ e(
|
|
128
|
+
K,
|
|
126
129
|
{
|
|
127
130
|
onClick: () => {
|
|
128
|
-
|
|
131
|
+
l.event(), i(l);
|
|
129
132
|
},
|
|
130
|
-
title:
|
|
131
|
-
children: /* @__PURE__ */
|
|
133
|
+
title: l.tooltip,
|
|
134
|
+
children: /* @__PURE__ */ e(
|
|
132
135
|
"button",
|
|
133
136
|
{
|
|
134
|
-
className:
|
|
135
|
-
"data-active":
|
|
136
|
-
children: /* @__PURE__ */
|
|
137
|
+
className: a.wuContentEditorAction,
|
|
138
|
+
"data-active": l.active,
|
|
139
|
+
children: /* @__PURE__ */ e(h, { icon: l.icon })
|
|
137
140
|
}
|
|
138
141
|
)
|
|
139
142
|
},
|
|
140
|
-
|
|
143
|
+
l.id
|
|
141
144
|
))
|
|
142
145
|
}
|
|
143
146
|
)
|
|
144
147
|
] });
|
|
145
|
-
},
|
|
146
|
-
const { editor: t } =
|
|
148
|
+
}, Lt = () => {
|
|
149
|
+
const { editor: t } = g(), n = p({
|
|
147
150
|
editor: t,
|
|
148
151
|
selector: (i) => {
|
|
149
|
-
var l,
|
|
152
|
+
var r, l, d, c, s, u, w;
|
|
150
153
|
return {
|
|
151
|
-
isLeft: (
|
|
152
|
-
isCenter: (
|
|
153
|
-
isRight: (
|
|
154
|
-
isJustify: (
|
|
155
|
-
isAligned: ((
|
|
154
|
+
isLeft: (r = i.editor) == null ? void 0 : r.isActive({ textAlign: "left" }),
|
|
155
|
+
isCenter: (l = i.editor) == null ? void 0 : l.isActive({ textAlign: "center" }),
|
|
156
|
+
isRight: (d = i.editor) == null ? void 0 : d.isActive({ textAlign: "right" }),
|
|
157
|
+
isJustify: (c = i.editor) == null ? void 0 : c.isActive({ textAlign: "justify" }),
|
|
158
|
+
isAligned: ((s = i.editor) == null ? void 0 : s.isActive({ textAlign: "center" })) || ((u = i.editor) == null ? void 0 : u.isActive({ textAlign: "right" })) || ((w = i.editor) == null ? void 0 : w.isActive({ textAlign: "justify" }))
|
|
156
159
|
};
|
|
157
160
|
}
|
|
158
|
-
}),
|
|
161
|
+
}), o = [
|
|
159
162
|
{
|
|
160
163
|
id: "left",
|
|
161
164
|
icon: "wm-format-align-left",
|
|
@@ -185,60 +188,60 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
185
188
|
active: n.isJustify
|
|
186
189
|
}
|
|
187
190
|
];
|
|
188
|
-
return /* @__PURE__ */
|
|
189
|
-
|
|
191
|
+
return /* @__PURE__ */ e(
|
|
192
|
+
P,
|
|
190
193
|
{
|
|
191
194
|
action: {
|
|
192
195
|
id: "style",
|
|
193
196
|
active: n.isAligned,
|
|
194
197
|
icon: "wm-format-paragraph",
|
|
195
|
-
items:
|
|
198
|
+
items: o
|
|
196
199
|
}
|
|
197
200
|
}
|
|
198
201
|
);
|
|
199
|
-
},
|
|
200
|
-
const { editor: t } =
|
|
202
|
+
}, Nt = () => {
|
|
203
|
+
const { editor: t } = g(), n = p({
|
|
201
204
|
editor: t,
|
|
202
|
-
selector: ({ editor:
|
|
203
|
-
bgColor:
|
|
205
|
+
selector: ({ editor: o }) => ({
|
|
206
|
+
bgColor: o.getAttributes("textStyle").backgroundColor
|
|
204
207
|
})
|
|
205
208
|
});
|
|
206
|
-
return /* @__PURE__ */
|
|
209
|
+
return /* @__PURE__ */ f(
|
|
207
210
|
"label",
|
|
208
211
|
{
|
|
209
|
-
className:
|
|
212
|
+
className: a.wuContentEditorAction,
|
|
210
213
|
htmlFor: "bg-color",
|
|
211
214
|
title: "Background Color",
|
|
212
215
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ e(h, { icon: "wm-border-color", style: { color: n.bgColor } }),
|
|
217
|
+
/* @__PURE__ */ e(
|
|
215
218
|
"input",
|
|
216
219
|
{
|
|
217
220
|
type: "color",
|
|
218
221
|
id: "bg-color",
|
|
219
222
|
name: "bg-color",
|
|
220
223
|
defaultValue: "#fff",
|
|
221
|
-
onChange: (
|
|
224
|
+
onChange: (o) => t.chain().focus().setBackgroundColor(o.target.value).run()
|
|
222
225
|
}
|
|
223
226
|
)
|
|
224
227
|
]
|
|
225
228
|
}
|
|
226
229
|
);
|
|
227
|
-
},
|
|
228
|
-
const { editor: t } =
|
|
230
|
+
}, _t = () => {
|
|
231
|
+
const { editor: t } = g(), n = p({
|
|
229
232
|
editor: t,
|
|
230
233
|
selector: (i) => {
|
|
231
|
-
var l,
|
|
234
|
+
var r, l, d, c, s, u;
|
|
232
235
|
return {
|
|
233
|
-
isParagraph: (
|
|
234
|
-
isH1: (
|
|
235
|
-
isH2: (
|
|
236
|
-
isH3: (
|
|
237
|
-
isH4: (
|
|
236
|
+
isParagraph: (r = i.editor) == null ? void 0 : r.isActive("paragraph"),
|
|
237
|
+
isH1: (l = i.editor) == null ? void 0 : l.isActive("heading", { level: 1 }),
|
|
238
|
+
isH2: (d = i.editor) == null ? void 0 : d.isActive("heading", { level: 2 }),
|
|
239
|
+
isH3: (c = i.editor) == null ? void 0 : c.isActive("heading", { level: 3 }),
|
|
240
|
+
isH4: (s = i.editor) == null ? void 0 : s.isActive("heading", { level: 4 }),
|
|
238
241
|
isStyle: (u = i.editor) == null ? void 0 : u.isActive("heading")
|
|
239
242
|
};
|
|
240
243
|
}
|
|
241
|
-
}),
|
|
244
|
+
}), o = [
|
|
242
245
|
{
|
|
243
246
|
id: "paragraph",
|
|
244
247
|
icon: "wm-format-paragraph",
|
|
@@ -270,222 +273,222 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
270
273
|
active: n.isH4
|
|
271
274
|
}
|
|
272
275
|
];
|
|
273
|
-
return /* @__PURE__ */
|
|
274
|
-
|
|
276
|
+
return /* @__PURE__ */ e(
|
|
277
|
+
P,
|
|
275
278
|
{
|
|
276
279
|
action: {
|
|
277
280
|
id: "style",
|
|
278
281
|
active: n.isStyle,
|
|
279
282
|
icon: "wm-format-paragraph",
|
|
280
|
-
items:
|
|
283
|
+
items: o
|
|
281
284
|
},
|
|
282
|
-
defaultValue:
|
|
285
|
+
defaultValue: o.find((i) => i.active)
|
|
283
286
|
}
|
|
284
287
|
);
|
|
285
|
-
},
|
|
286
|
-
const { editor: t } =
|
|
288
|
+
}, It = () => {
|
|
289
|
+
const { editor: t } = g(), n = p({
|
|
287
290
|
editor: t,
|
|
288
|
-
selector: (
|
|
291
|
+
selector: (o) => {
|
|
289
292
|
var i;
|
|
290
293
|
return {
|
|
291
|
-
blockquote: (i =
|
|
294
|
+
blockquote: (i = o.editor) == null ? void 0 : i.isActive("blockquote")
|
|
292
295
|
};
|
|
293
296
|
}
|
|
294
297
|
});
|
|
295
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ e(
|
|
296
299
|
"button",
|
|
297
300
|
{
|
|
298
301
|
title: "quote",
|
|
299
|
-
className:
|
|
302
|
+
className: a.wuContentEditorAction,
|
|
300
303
|
"data-active": n.blockquote,
|
|
301
|
-
onClick: (
|
|
302
|
-
|
|
304
|
+
onClick: (o) => {
|
|
305
|
+
o.preventDefault(), t.chain().focus().toggleBlockquote().run();
|
|
303
306
|
},
|
|
304
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-format-quote" })
|
|
305
308
|
}
|
|
306
309
|
);
|
|
307
|
-
},
|
|
308
|
-
const { editor: t } =
|
|
310
|
+
}, Dt = () => {
|
|
311
|
+
const { editor: t } = g(), n = p({
|
|
309
312
|
editor: t,
|
|
310
|
-
selector: (
|
|
313
|
+
selector: (o) => {
|
|
311
314
|
var i;
|
|
312
315
|
return {
|
|
313
|
-
bold: (i =
|
|
316
|
+
bold: (i = o.editor) == null ? void 0 : i.isActive("bold")
|
|
314
317
|
};
|
|
315
318
|
}
|
|
316
319
|
});
|
|
317
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ e(
|
|
318
321
|
"button",
|
|
319
322
|
{
|
|
320
323
|
title: "Bold",
|
|
321
|
-
className:
|
|
324
|
+
className: a.wuContentEditorAction,
|
|
322
325
|
"data-active": n.bold,
|
|
323
|
-
onClick: (
|
|
324
|
-
|
|
326
|
+
onClick: (o) => {
|
|
327
|
+
o.preventDefault(), t.chain().focus().toggleBold().run();
|
|
325
328
|
},
|
|
326
|
-
children: /* @__PURE__ */
|
|
329
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-format-bold" })
|
|
327
330
|
}
|
|
328
331
|
);
|
|
329
|
-
},
|
|
330
|
-
const { editor: t } =
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
+
}, Ht = () => {
|
|
333
|
+
const { editor: t } = g();
|
|
334
|
+
return /* @__PURE__ */ e(y, { children: [
|
|
332
335
|
{
|
|
333
336
|
id: "clear",
|
|
334
337
|
icon: "wm-format-clear",
|
|
335
338
|
event: () => t.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
336
339
|
tooltip: "Clear Formatting"
|
|
337
340
|
}
|
|
338
|
-
].map((
|
|
341
|
+
].map((o) => /* @__PURE__ */ e(
|
|
339
342
|
"button",
|
|
340
343
|
{
|
|
341
|
-
title:
|
|
342
|
-
className:
|
|
344
|
+
title: o.tooltip,
|
|
345
|
+
className: a.wuContentEditorAction,
|
|
343
346
|
onClick: (i) => {
|
|
344
|
-
i.preventDefault(),
|
|
347
|
+
i.preventDefault(), o.event();
|
|
345
348
|
},
|
|
346
|
-
children: /* @__PURE__ */
|
|
349
|
+
children: /* @__PURE__ */ e(h, { icon: o.icon })
|
|
347
350
|
},
|
|
348
|
-
|
|
351
|
+
o.id
|
|
349
352
|
)) });
|
|
350
|
-
},
|
|
351
|
-
const { editor: t } =
|
|
353
|
+
}, Rt = () => {
|
|
354
|
+
const { editor: t } = g(), n = p({
|
|
352
355
|
editor: t,
|
|
353
|
-
selector: (
|
|
354
|
-
code:
|
|
356
|
+
selector: (o) => ({
|
|
357
|
+
code: o.editor.isActive("code")
|
|
355
358
|
})
|
|
356
359
|
});
|
|
357
|
-
return /* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ e(
|
|
358
361
|
"button",
|
|
359
362
|
{
|
|
360
|
-
className:
|
|
363
|
+
className: a.wuContentEditorAction,
|
|
361
364
|
"data-active": n.code,
|
|
362
365
|
title: "Code line",
|
|
363
|
-
onMouseDown: (
|
|
364
|
-
|
|
366
|
+
onMouseDown: (o) => {
|
|
367
|
+
o.preventDefault(), t.chain().focus().toggleCode().run();
|
|
365
368
|
},
|
|
366
|
-
children: /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-code" })
|
|
367
370
|
}
|
|
368
371
|
);
|
|
369
|
-
},
|
|
370
|
-
const { editor: t } =
|
|
372
|
+
}, Mt = () => {
|
|
373
|
+
const { editor: t } = g(), n = p({
|
|
371
374
|
editor: t,
|
|
372
|
-
selector: (
|
|
373
|
-
var
|
|
375
|
+
selector: (c) => {
|
|
376
|
+
var s, u;
|
|
374
377
|
return {
|
|
375
|
-
isImage: (
|
|
376
|
-
imageAttrs: (u =
|
|
378
|
+
isImage: (s = c.editor) == null ? void 0 : s.isActive("image"),
|
|
379
|
+
imageAttrs: (u = c.editor) == null ? void 0 : u.getAttributes("image")
|
|
377
380
|
};
|
|
378
381
|
}
|
|
379
|
-
}), [
|
|
380
|
-
t.chain().focus().setImage({ src:
|
|
382
|
+
}), [o, i] = m.useState(n.imageAttrs.src || ""), [r, l] = m.useState(n.imageAttrs.alt || ""), d = () => {
|
|
383
|
+
t.chain().focus().setImage({ src: o, alt: r }).run();
|
|
381
384
|
};
|
|
382
|
-
return /* @__PURE__ */
|
|
383
|
-
|
|
385
|
+
return /* @__PURE__ */ f(
|
|
386
|
+
H,
|
|
384
387
|
{
|
|
385
|
-
Trigger: /* @__PURE__ */
|
|
388
|
+
Trigger: /* @__PURE__ */ e(
|
|
386
389
|
"button",
|
|
387
390
|
{
|
|
388
|
-
className:
|
|
391
|
+
className: a.wuContentEditorAction,
|
|
389
392
|
"data-active": n.isImage,
|
|
390
|
-
children: /* @__PURE__ */
|
|
393
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-image" })
|
|
391
394
|
}
|
|
392
395
|
),
|
|
393
396
|
maxWidth: "400px",
|
|
394
397
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
|
|
398
|
+
/* @__PURE__ */ e(R, { style: { display: "none" } }),
|
|
399
|
+
/* @__PURE__ */ f(M, { className: a.wuContentEditorModal, children: [
|
|
400
|
+
/* @__PURE__ */ e(
|
|
401
|
+
x,
|
|
399
402
|
{
|
|
400
403
|
Label: "Image URL",
|
|
401
404
|
type: "url",
|
|
402
|
-
value:
|
|
403
|
-
onChange: (
|
|
405
|
+
value: o,
|
|
406
|
+
onChange: (c) => i(c.target.value),
|
|
404
407
|
required: !0
|
|
405
408
|
}
|
|
406
409
|
),
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
|
|
410
|
+
/* @__PURE__ */ e(
|
|
411
|
+
x,
|
|
409
412
|
{
|
|
410
413
|
Label: "Alt Text",
|
|
411
414
|
type: "text",
|
|
412
|
-
value:
|
|
413
|
-
onChange: (
|
|
415
|
+
value: r,
|
|
416
|
+
onChange: (c) => l(c.target.value)
|
|
414
417
|
}
|
|
415
418
|
)
|
|
416
419
|
] }),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ f(z, { children: [
|
|
421
|
+
/* @__PURE__ */ e(T, { variant: "secondary", children: "Cancel" }),
|
|
422
|
+
/* @__PURE__ */ e(T, { onClick: d, disabled: !o, children: "Save" })
|
|
420
423
|
] })
|
|
421
424
|
]
|
|
422
425
|
}
|
|
423
426
|
);
|
|
424
|
-
},
|
|
425
|
-
const { editor: t } =
|
|
427
|
+
}, zt = () => {
|
|
428
|
+
const { editor: t } = g(), n = p({
|
|
426
429
|
editor: t,
|
|
427
|
-
selector: (
|
|
428
|
-
var u,
|
|
430
|
+
selector: (s) => {
|
|
431
|
+
var u, w;
|
|
429
432
|
return {
|
|
430
|
-
isLink: (u =
|
|
431
|
-
linkAttrs: (
|
|
433
|
+
isLink: (u = s.editor) == null ? void 0 : u.isActive("link"),
|
|
434
|
+
linkAttrs: (w = s.editor) == null ? void 0 : w.getAttributes("link")
|
|
432
435
|
};
|
|
433
436
|
}
|
|
434
|
-
}), [
|
|
437
|
+
}), [o, i] = m.useState(n.linkAttrs.href || ""), [r, l] = m.useState(n.linkAttrs.alt || ""), d = () => {
|
|
435
438
|
t.chain().focus().insertContent({
|
|
436
439
|
type: "text",
|
|
437
|
-
text:
|
|
438
|
-
marks: [{ type: "link", attrs: { href:
|
|
440
|
+
text: r || o,
|
|
441
|
+
marks: [{ type: "link", attrs: { href: o } }]
|
|
439
442
|
}).run();
|
|
440
|
-
},
|
|
441
|
-
const { $from:
|
|
442
|
-
let
|
|
443
|
-
for (;
|
|
444
|
-
|
|
445
|
-
for (;
|
|
446
|
-
|
|
447
|
-
const
|
|
448
|
-
t.commands.setTextSelection({ from:
|
|
443
|
+
}, c = () => {
|
|
444
|
+
const { $from: s } = t.state.selection, u = s.parent.textContent, w = s.parentOffset;
|
|
445
|
+
let v = w, A = w;
|
|
446
|
+
for (; v > 0 && !/\s/.test(u[v - 1]); )
|
|
447
|
+
v--;
|
|
448
|
+
for (; A < u.length && !/\s/.test(u[A]); )
|
|
449
|
+
A++;
|
|
450
|
+
const E = s.start(), S = E + v, F = E + A, L = u.slice(v, A);
|
|
451
|
+
t.commands.setTextSelection({ from: S, to: F }), i(n.linkAttrs.href || ""), l(L || n.linkAttrs.alt || "");
|
|
449
452
|
};
|
|
450
|
-
return /* @__PURE__ */
|
|
451
|
-
|
|
453
|
+
return /* @__PURE__ */ f(
|
|
454
|
+
H,
|
|
452
455
|
{
|
|
453
|
-
Trigger: /* @__PURE__ */
|
|
456
|
+
Trigger: /* @__PURE__ */ e(
|
|
454
457
|
"button",
|
|
455
458
|
{
|
|
456
|
-
className:
|
|
459
|
+
className: a.wuContentEditorAction,
|
|
457
460
|
"data-active": n.isLink,
|
|
458
|
-
children: /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-link" })
|
|
459
462
|
}
|
|
460
463
|
),
|
|
461
464
|
maxWidth: "400px",
|
|
462
|
-
onOpenChange: (
|
|
465
|
+
onOpenChange: (s) => s && c(),
|
|
463
466
|
children: [
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
|
|
467
|
+
/* @__PURE__ */ e(R, { style: { display: "none" } }),
|
|
468
|
+
/* @__PURE__ */ f(M, { className: a.wuContentEditorModal, children: [
|
|
469
|
+
/* @__PURE__ */ e(
|
|
470
|
+
x,
|
|
468
471
|
{
|
|
469
472
|
Label: "Link",
|
|
470
473
|
type: "url",
|
|
471
|
-
value:
|
|
472
|
-
onChange: (
|
|
474
|
+
value: o,
|
|
475
|
+
onChange: (s) => i(s.target.value),
|
|
473
476
|
required: !0
|
|
474
477
|
}
|
|
475
478
|
),
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
|
|
479
|
+
/* @__PURE__ */ e(
|
|
480
|
+
x,
|
|
478
481
|
{
|
|
479
482
|
Label: "Text to display",
|
|
480
483
|
type: "text",
|
|
481
|
-
value:
|
|
482
|
-
onChange: (
|
|
484
|
+
value: r,
|
|
485
|
+
onChange: (s) => l(s.target.value)
|
|
483
486
|
}
|
|
484
487
|
)
|
|
485
488
|
] }),
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
n.isLink && /* @__PURE__ */
|
|
488
|
-
|
|
489
|
+
/* @__PURE__ */ f(z, { children: [
|
|
490
|
+
n.isLink && /* @__PURE__ */ e(
|
|
491
|
+
T,
|
|
489
492
|
{
|
|
490
493
|
color: "error",
|
|
491
494
|
onClick: () => t.chain().focus().unsetLink().run(),
|
|
@@ -493,27 +496,27 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
493
496
|
children: "Remove"
|
|
494
497
|
}
|
|
495
498
|
),
|
|
496
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ e(T, { onClick: d, disabled: !o, children: "Save" })
|
|
497
500
|
] })
|
|
498
501
|
]
|
|
499
502
|
}
|
|
500
503
|
);
|
|
501
|
-
},
|
|
502
|
-
const { editor: t } =
|
|
504
|
+
}, Pt = () => {
|
|
505
|
+
const { editor: t } = g(), n = p({
|
|
503
506
|
editor: t,
|
|
504
|
-
selector: (
|
|
505
|
-
isTable:
|
|
506
|
-
tableAttrs:
|
|
507
|
+
selector: (s) => ({
|
|
508
|
+
isTable: s.editor.isActive("table"),
|
|
509
|
+
tableAttrs: s.editor.getAttributes("table")
|
|
507
510
|
})
|
|
508
|
-
}), [
|
|
509
|
-
|
|
510
|
-
t.chain().focus().insertTable({ rows: 2, cols: 4, withHeaderRow:
|
|
511
|
+
}), [o, i] = D(!1), r = Z(null), l = O(() => {
|
|
512
|
+
r.current = setTimeout(() => {
|
|
513
|
+
t.chain().focus().insertTable({ rows: 2, cols: 4, withHeaderRow: o }).run();
|
|
511
514
|
}, 100);
|
|
512
|
-
}, [t,
|
|
513
|
-
i((
|
|
515
|
+
}, [t, o]), d = O(() => {
|
|
516
|
+
i((s) => !s), r.current = setTimeout(() => {
|
|
514
517
|
t.chain().focus().toggleHeaderRow().run();
|
|
515
518
|
}, 100);
|
|
516
|
-
}, [t]),
|
|
519
|
+
}, [t]), c = [
|
|
517
520
|
{
|
|
518
521
|
text: "Column left",
|
|
519
522
|
icon: "wm-add",
|
|
@@ -545,67 +548,67 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
545
548
|
event: () => t.chain().focus().deleteRow().run()
|
|
546
549
|
}
|
|
547
550
|
];
|
|
548
|
-
return n.isTable ? /* @__PURE__ */
|
|
549
|
-
|
|
551
|
+
return n.isTable ? /* @__PURE__ */ f(
|
|
552
|
+
H,
|
|
550
553
|
{
|
|
551
|
-
Trigger: /* @__PURE__ */
|
|
554
|
+
Trigger: /* @__PURE__ */ e(
|
|
552
555
|
"button",
|
|
553
556
|
{
|
|
554
|
-
className:
|
|
557
|
+
className: a.wuContentEditorAction,
|
|
555
558
|
"data-active": n.isTable,
|
|
556
|
-
children: /* @__PURE__ */
|
|
559
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-table" })
|
|
557
560
|
}
|
|
558
561
|
),
|
|
559
562
|
maxWidth: "320px",
|
|
560
563
|
children: [
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
|
|
564
|
+
/* @__PURE__ */ e(R, { style: { display: "none" } }),
|
|
565
|
+
/* @__PURE__ */ f(M, { className: a.wuContentEditorModal, children: [
|
|
566
|
+
/* @__PURE__ */ e(
|
|
567
|
+
ht,
|
|
565
568
|
{
|
|
566
|
-
checked:
|
|
567
|
-
onClick:
|
|
569
|
+
checked: o,
|
|
570
|
+
onClick: d,
|
|
568
571
|
Label: "Title Row",
|
|
569
572
|
labelPosition: "left"
|
|
570
573
|
}
|
|
571
574
|
),
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
|
|
575
|
+
/* @__PURE__ */ e("div", { className: a.wuContentEditorTable, children: c.map(({ text: s, icon: u, event: w }) => /* @__PURE__ */ e(
|
|
576
|
+
q,
|
|
574
577
|
{
|
|
575
|
-
onClick:
|
|
578
|
+
onClick: w,
|
|
576
579
|
variant: "secondary",
|
|
577
|
-
Icon: /* @__PURE__ */
|
|
578
|
-
children:
|
|
580
|
+
Icon: /* @__PURE__ */ e(h, { icon: u }),
|
|
581
|
+
children: s
|
|
579
582
|
},
|
|
580
|
-
|
|
583
|
+
s
|
|
581
584
|
)) })
|
|
582
585
|
] }),
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
|
|
586
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
|
|
587
|
+
T,
|
|
585
588
|
{
|
|
586
589
|
onClick: () => t.chain().focus().deleteTable().run(),
|
|
587
590
|
variant: "outline",
|
|
588
591
|
color: "error",
|
|
589
|
-
Icon: /* @__PURE__ */
|
|
592
|
+
Icon: /* @__PURE__ */ e("span", { className: "wm-delete" }),
|
|
590
593
|
iconPosition: "left",
|
|
591
594
|
children: "Delete Table"
|
|
592
595
|
}
|
|
593
596
|
) })
|
|
594
597
|
]
|
|
595
598
|
}
|
|
596
|
-
) : /* @__PURE__ */
|
|
599
|
+
) : /* @__PURE__ */ e(
|
|
597
600
|
"button",
|
|
598
601
|
{
|
|
599
|
-
onClick:
|
|
600
|
-
className:
|
|
601
|
-
children: /* @__PURE__ */
|
|
602
|
+
onClick: l,
|
|
603
|
+
className: a.wuContentEditorAction,
|
|
604
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-table" })
|
|
602
605
|
}
|
|
603
606
|
);
|
|
604
|
-
},
|
|
605
|
-
const { editor: t, customFonts: n } =
|
|
607
|
+
}, Bt = () => {
|
|
608
|
+
const { editor: t, customFonts: n } = g(), o = p({
|
|
606
609
|
editor: t,
|
|
607
|
-
selector: (
|
|
608
|
-
currentFontFamily:
|
|
610
|
+
selector: (d) => ({
|
|
611
|
+
currentFontFamily: d.editor.getAttributes("textStyle").fontFamily || ""
|
|
609
612
|
})
|
|
610
613
|
}), i = [
|
|
611
614
|
"Fira Sans",
|
|
@@ -614,82 +617,82 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
614
617
|
"JetBrains Mono",
|
|
615
618
|
"Montserrat",
|
|
616
619
|
...n || []
|
|
617
|
-
], [
|
|
618
|
-
|
|
620
|
+
], [r, l] = D(
|
|
621
|
+
o.currentFontFamily || i[0]
|
|
619
622
|
);
|
|
620
|
-
return
|
|
621
|
-
var
|
|
622
|
-
|
|
623
|
-
((
|
|
623
|
+
return m.useEffect(() => {
|
|
624
|
+
var d;
|
|
625
|
+
l(
|
|
626
|
+
((d = o.currentFontFamily) == null ? void 0 : d.replace(/"/g, "")) || i[0]
|
|
624
627
|
);
|
|
625
|
-
}, [
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
|
|
628
|
+
}, [o.currentFontFamily]), /* @__PURE__ */ f(U, { children: [
|
|
629
|
+
/* @__PURE__ */ e(
|
|
630
|
+
$,
|
|
628
631
|
{
|
|
629
|
-
className:
|
|
630
|
-
"data-active":
|
|
631
|
-
style: { fontFamily:
|
|
632
|
-
title:
|
|
633
|
-
children:
|
|
632
|
+
className: a.wuContentEditorAction,
|
|
633
|
+
"data-active": r !== "Fira Sans",
|
|
634
|
+
style: { fontFamily: r },
|
|
635
|
+
title: r || "Font Family",
|
|
636
|
+
children: r == null ? void 0 : r[0]
|
|
634
637
|
}
|
|
635
638
|
),
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
|
|
639
|
+
/* @__PURE__ */ e(
|
|
640
|
+
j,
|
|
638
641
|
{
|
|
639
642
|
align: "start",
|
|
640
|
-
className:
|
|
643
|
+
className: a.wuContentEditorDropdown,
|
|
641
644
|
"data-block": !0,
|
|
642
|
-
onCloseAutoFocus: (
|
|
643
|
-
children: i.map((
|
|
644
|
-
|
|
645
|
+
onCloseAutoFocus: (d) => d.preventDefault(),
|
|
646
|
+
children: i.map((d) => /* @__PURE__ */ e(
|
|
647
|
+
K,
|
|
645
648
|
{
|
|
646
|
-
title:
|
|
647
|
-
className:
|
|
649
|
+
title: d,
|
|
650
|
+
className: a.wuContentEditorDropdownItem,
|
|
648
651
|
onSelect: () => {
|
|
649
|
-
t.chain().focus().setFontFamily(
|
|
652
|
+
t.chain().focus().setFontFamily(d).run(), l(d);
|
|
650
653
|
},
|
|
651
|
-
children:
|
|
654
|
+
children: d
|
|
652
655
|
},
|
|
653
|
-
|
|
656
|
+
d
|
|
654
657
|
))
|
|
655
658
|
}
|
|
656
659
|
)
|
|
657
660
|
] });
|
|
658
|
-
},
|
|
659
|
-
const { editor: t } =
|
|
661
|
+
}, Ot = () => {
|
|
662
|
+
const { editor: t } = g(), n = p({
|
|
660
663
|
editor: t,
|
|
661
|
-
selector: (
|
|
664
|
+
selector: (o) => {
|
|
662
665
|
var i;
|
|
663
666
|
return {
|
|
664
|
-
italic: (i =
|
|
667
|
+
italic: (i = o.editor) == null ? void 0 : i.isActive("italic")
|
|
665
668
|
};
|
|
666
669
|
}
|
|
667
670
|
});
|
|
668
|
-
return /* @__PURE__ */
|
|
671
|
+
return /* @__PURE__ */ e(
|
|
669
672
|
"button",
|
|
670
673
|
{
|
|
671
674
|
title: "Italic",
|
|
672
|
-
className:
|
|
675
|
+
className: a.wuContentEditorAction,
|
|
673
676
|
"data-active": n.italic,
|
|
674
|
-
onClick: (
|
|
675
|
-
|
|
677
|
+
onClick: (o) => {
|
|
678
|
+
o.preventDefault(), t.chain().focus().toggleItalic().run();
|
|
676
679
|
},
|
|
677
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-format-italic" })
|
|
678
681
|
}
|
|
679
682
|
);
|
|
680
|
-
},
|
|
681
|
-
const { editor: t } =
|
|
683
|
+
}, Wt = () => {
|
|
684
|
+
const { editor: t } = g(), n = p({
|
|
682
685
|
editor: t,
|
|
683
686
|
selector: (i) => {
|
|
684
|
-
var l,
|
|
687
|
+
var r, l, d, c, s, u;
|
|
685
688
|
return {
|
|
686
|
-
isUl: (
|
|
687
|
-
isOl: (
|
|
688
|
-
isTodo: (
|
|
689
|
-
isList: ((
|
|
689
|
+
isUl: (r = i.editor) == null ? void 0 : r.isActive("bulletList"),
|
|
690
|
+
isOl: (l = i.editor) == null ? void 0 : l.isActive("orderedList"),
|
|
691
|
+
isTodo: (d = i.editor) == null ? void 0 : d.isActive("taskList"),
|
|
692
|
+
isList: ((c = i.editor) == null ? void 0 : c.isActive("bulletList")) || ((s = i.editor) == null ? void 0 : s.isActive("orderedList")) || ((u = i.editor) == null ? void 0 : u.isActive("taskList"))
|
|
690
693
|
};
|
|
691
694
|
}
|
|
692
|
-
}),
|
|
695
|
+
}), o = [
|
|
693
696
|
{
|
|
694
697
|
id: "ul",
|
|
695
698
|
icon: "wm-format-list-bulleted",
|
|
@@ -712,211 +715,211 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
712
715
|
tooltip: "To-Do List"
|
|
713
716
|
}
|
|
714
717
|
];
|
|
715
|
-
return /* @__PURE__ */
|
|
716
|
-
|
|
718
|
+
return /* @__PURE__ */ e(
|
|
719
|
+
P,
|
|
717
720
|
{
|
|
718
721
|
action: {
|
|
719
722
|
id: "style",
|
|
720
723
|
active: n.isList,
|
|
721
724
|
icon: "wm-format-paragraph",
|
|
722
|
-
items:
|
|
725
|
+
items: o
|
|
723
726
|
}
|
|
724
727
|
}
|
|
725
728
|
);
|
|
726
|
-
},
|
|
727
|
-
const { editor: t } =
|
|
729
|
+
}, qt = ["e", "E", "+", "-"], W = 1, Ut = () => {
|
|
730
|
+
const { editor: t } = g(), [n, o] = D(16), i = p({
|
|
728
731
|
editor: t,
|
|
729
|
-
selector: (
|
|
730
|
-
fontSize:
|
|
732
|
+
selector: (c) => ({
|
|
733
|
+
fontSize: c.editor.getAttributes("textStyle").fontSize
|
|
731
734
|
})
|
|
732
|
-
}),
|
|
733
|
-
t.chain().focus().setFontSize(
|
|
734
|
-
},
|
|
735
|
-
const
|
|
736
|
-
|
|
737
|
-
},
|
|
738
|
-
|
|
735
|
+
}), r = (c) => {
|
|
736
|
+
t.chain().focus().setFontSize(c + "px").run();
|
|
737
|
+
}, l = (c) => {
|
|
738
|
+
const s = Math.max(W, c);
|
|
739
|
+
o(s), r(s);
|
|
740
|
+
}, d = (c) => {
|
|
741
|
+
qt.includes(c.key) ? c.preventDefault() : c.key === "Enter" && r(n);
|
|
739
742
|
};
|
|
740
|
-
return
|
|
741
|
-
var
|
|
742
|
-
|
|
743
|
-
}, [i.fontSize]), /* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
743
|
+
return m.useEffect(() => {
|
|
744
|
+
var c;
|
|
745
|
+
o(Number((c = i.fontSize) == null ? void 0 : c.replace("px", "")) || 16);
|
|
746
|
+
}, [i.fontSize]), /* @__PURE__ */ f("div", { className: a.wuContentEditorFontSize, children: [
|
|
747
|
+
/* @__PURE__ */ e(
|
|
745
748
|
"button",
|
|
746
749
|
{
|
|
747
|
-
className:
|
|
748
|
-
onClick: () =>
|
|
749
|
-
disabled: n <=
|
|
750
|
+
className: a.wuContentEditorAction,
|
|
751
|
+
onClick: () => l(n - 1),
|
|
752
|
+
disabled: n <= W,
|
|
750
753
|
children: "−"
|
|
751
754
|
}
|
|
752
755
|
),
|
|
753
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ e(
|
|
754
757
|
"input",
|
|
755
758
|
{
|
|
756
759
|
type: "number",
|
|
757
760
|
inputMode: "numeric",
|
|
758
761
|
pattern: "[0-9]*",
|
|
759
762
|
value: n,
|
|
760
|
-
onKeyDown:
|
|
761
|
-
onChange: (
|
|
762
|
-
onBlur: () =>
|
|
763
|
+
onKeyDown: d,
|
|
764
|
+
onChange: (c) => o(c.target.valueAsNumber),
|
|
765
|
+
onBlur: () => r(n)
|
|
763
766
|
}
|
|
764
767
|
),
|
|
765
|
-
/* @__PURE__ */
|
|
768
|
+
/* @__PURE__ */ e(
|
|
766
769
|
"button",
|
|
767
770
|
{
|
|
768
|
-
className:
|
|
769
|
-
onClick: () =>
|
|
771
|
+
className: a.wuContentEditorAction,
|
|
772
|
+
onClick: () => l(n + 1),
|
|
770
773
|
disabled: n >= 128,
|
|
771
774
|
children: "+"
|
|
772
775
|
}
|
|
773
776
|
)
|
|
774
777
|
] });
|
|
775
|
-
},
|
|
776
|
-
const { editor: t } =
|
|
778
|
+
}, $t = () => {
|
|
779
|
+
const { editor: t } = g(), n = p({
|
|
777
780
|
editor: t,
|
|
778
|
-
selector: (
|
|
781
|
+
selector: (o) => {
|
|
779
782
|
var i;
|
|
780
783
|
return {
|
|
781
|
-
strikethrough: (i =
|
|
784
|
+
strikethrough: (i = o.editor) == null ? void 0 : i.isActive("strike")
|
|
782
785
|
};
|
|
783
786
|
}
|
|
784
787
|
});
|
|
785
|
-
return /* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ e(
|
|
786
789
|
"button",
|
|
787
790
|
{
|
|
788
791
|
title: "strikethrough",
|
|
789
|
-
className:
|
|
792
|
+
className: a.wuContentEditorAction,
|
|
790
793
|
"data-active": n.strikethrough,
|
|
791
|
-
onClick: (
|
|
792
|
-
|
|
794
|
+
onClick: (o) => {
|
|
795
|
+
o.preventDefault(), t.chain().focus().toggleStrike().run();
|
|
793
796
|
},
|
|
794
|
-
children: /* @__PURE__ */
|
|
797
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-format-strikethrough" })
|
|
795
798
|
}
|
|
796
799
|
);
|
|
797
|
-
},
|
|
798
|
-
const { editor: t } =
|
|
800
|
+
}, jt = () => {
|
|
801
|
+
const { editor: t } = g(), n = p({
|
|
799
802
|
editor: t,
|
|
800
|
-
selector: (
|
|
803
|
+
selector: (o) => {
|
|
801
804
|
var i;
|
|
802
805
|
return {
|
|
803
|
-
subscript: (i =
|
|
806
|
+
subscript: (i = o.editor) == null ? void 0 : i.isActive("subscript")
|
|
804
807
|
};
|
|
805
808
|
}
|
|
806
809
|
});
|
|
807
|
-
return /* @__PURE__ */
|
|
810
|
+
return /* @__PURE__ */ e(
|
|
808
811
|
"button",
|
|
809
812
|
{
|
|
810
813
|
title: "Subscript",
|
|
811
|
-
className:
|
|
814
|
+
className: a.wuContentEditorAction,
|
|
812
815
|
"data-active": n.subscript,
|
|
813
|
-
onClick: (
|
|
814
|
-
|
|
816
|
+
onClick: (o) => {
|
|
817
|
+
o.preventDefault(), t.chain().focus().toggleSubscript().run();
|
|
815
818
|
},
|
|
816
|
-
children: /* @__PURE__ */
|
|
819
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-subscript" })
|
|
817
820
|
}
|
|
818
821
|
);
|
|
819
|
-
},
|
|
820
|
-
const { editor: t } =
|
|
822
|
+
}, Kt = () => {
|
|
823
|
+
const { editor: t } = g(), n = p({
|
|
821
824
|
editor: t,
|
|
822
|
-
selector: (
|
|
825
|
+
selector: (o) => {
|
|
823
826
|
var i;
|
|
824
827
|
return {
|
|
825
|
-
superscript: (i =
|
|
828
|
+
superscript: (i = o.editor) == null ? void 0 : i.isActive("superscript")
|
|
826
829
|
};
|
|
827
830
|
}
|
|
828
831
|
});
|
|
829
|
-
return /* @__PURE__ */
|
|
832
|
+
return /* @__PURE__ */ e(
|
|
830
833
|
"button",
|
|
831
834
|
{
|
|
832
835
|
title: "Superscript",
|
|
833
|
-
className:
|
|
836
|
+
className: a.wuContentEditorAction,
|
|
834
837
|
"data-active": n.superscript,
|
|
835
|
-
onClick: (
|
|
836
|
-
|
|
838
|
+
onClick: (o) => {
|
|
839
|
+
o.preventDefault(), t.chain().focus().toggleSuperscript().run();
|
|
837
840
|
},
|
|
838
|
-
children: /* @__PURE__ */
|
|
841
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-superscript" })
|
|
839
842
|
}
|
|
840
843
|
);
|
|
841
|
-
},
|
|
842
|
-
const { editor: t } =
|
|
844
|
+
}, Jt = () => {
|
|
845
|
+
const { editor: t } = g(), n = p({
|
|
843
846
|
editor: t,
|
|
844
|
-
selector: ({ editor:
|
|
845
|
-
textColor:
|
|
847
|
+
selector: ({ editor: o }) => ({
|
|
848
|
+
textColor: o.getAttributes("textStyle").color
|
|
846
849
|
})
|
|
847
850
|
});
|
|
848
|
-
return /* @__PURE__ */
|
|
851
|
+
return /* @__PURE__ */ f(
|
|
849
852
|
"label",
|
|
850
853
|
{
|
|
851
|
-
className:
|
|
854
|
+
className: a.wuContentEditorAction,
|
|
852
855
|
htmlFor: "text-color",
|
|
853
856
|
title: "Text Color",
|
|
854
857
|
children: [
|
|
855
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ e(
|
|
856
859
|
h,
|
|
857
860
|
{
|
|
858
861
|
icon: "wm-format-color-text",
|
|
859
|
-
className:
|
|
862
|
+
className: a.bgColorCursorPointer,
|
|
860
863
|
style: { color: n.textColor }
|
|
861
864
|
}
|
|
862
865
|
),
|
|
863
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ e(
|
|
864
867
|
"input",
|
|
865
868
|
{
|
|
866
869
|
type: "color",
|
|
867
|
-
className:
|
|
870
|
+
className: a.bgColorHiddenInput,
|
|
868
871
|
id: "text-color",
|
|
869
872
|
defaultValue: "#545E6B",
|
|
870
|
-
onChange: (
|
|
873
|
+
onChange: (o) => t.chain().focus().setColor(o.target.value).run()
|
|
871
874
|
}
|
|
872
875
|
)
|
|
873
876
|
]
|
|
874
877
|
}
|
|
875
878
|
);
|
|
876
|
-
},
|
|
877
|
-
const { editor: t } =
|
|
879
|
+
}, Gt = () => {
|
|
880
|
+
const { editor: t } = g(), n = p({
|
|
878
881
|
editor: t,
|
|
879
|
-
selector: (
|
|
882
|
+
selector: (o) => {
|
|
880
883
|
var i;
|
|
881
884
|
return {
|
|
882
|
-
underline: (i =
|
|
885
|
+
underline: (i = o.editor) == null ? void 0 : i.isActive("underline")
|
|
883
886
|
};
|
|
884
887
|
}
|
|
885
888
|
});
|
|
886
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ e(
|
|
887
890
|
"button",
|
|
888
891
|
{
|
|
889
892
|
title: "Underline",
|
|
890
|
-
className:
|
|
893
|
+
className: a.wuContentEditorAction,
|
|
891
894
|
"data-active": n.underline,
|
|
892
|
-
onClick: (
|
|
893
|
-
|
|
895
|
+
onClick: (o) => {
|
|
896
|
+
o.preventDefault(), t.chain().focus().toggleUnderline().run();
|
|
894
897
|
},
|
|
895
|
-
children: /* @__PURE__ */
|
|
898
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-format-underlined" })
|
|
896
899
|
}
|
|
897
900
|
);
|
|
898
|
-
},
|
|
899
|
-
block: /* @__PURE__ */
|
|
900
|
-
fontFamily: /* @__PURE__ */
|
|
901
|
-
fontSize: /* @__PURE__ */
|
|
902
|
-
bold: /* @__PURE__ */
|
|
903
|
-
italic: /* @__PURE__ */
|
|
904
|
-
underline: /* @__PURE__ */
|
|
905
|
-
strike: /* @__PURE__ */
|
|
906
|
-
color: /* @__PURE__ */
|
|
907
|
-
bgColor: /* @__PURE__ */
|
|
908
|
-
list: /* @__PURE__ */
|
|
909
|
-
alignment: /* @__PURE__ */
|
|
910
|
-
image: /* @__PURE__ */
|
|
911
|
-
link: /* @__PURE__ */
|
|
912
|
-
table: /* @__PURE__ */
|
|
913
|
-
blockquote: /* @__PURE__ */
|
|
914
|
-
superscript: /* @__PURE__ */
|
|
915
|
-
subscript: /* @__PURE__ */
|
|
916
|
-
codeline: /* @__PURE__ */
|
|
917
|
-
clear: /* @__PURE__ */
|
|
901
|
+
}, Vt = {
|
|
902
|
+
block: /* @__PURE__ */ e(_t, {}),
|
|
903
|
+
fontFamily: /* @__PURE__ */ e(Bt, {}),
|
|
904
|
+
fontSize: /* @__PURE__ */ e(Ut, {}),
|
|
905
|
+
bold: /* @__PURE__ */ e(Dt, {}),
|
|
906
|
+
italic: /* @__PURE__ */ e(Ot, {}),
|
|
907
|
+
underline: /* @__PURE__ */ e(Gt, {}),
|
|
908
|
+
strike: /* @__PURE__ */ e($t, {}),
|
|
909
|
+
color: /* @__PURE__ */ e(Jt, {}),
|
|
910
|
+
bgColor: /* @__PURE__ */ e(Nt, {}),
|
|
911
|
+
list: /* @__PURE__ */ e(Wt, {}),
|
|
912
|
+
alignment: /* @__PURE__ */ e(Lt, {}),
|
|
913
|
+
image: /* @__PURE__ */ e(Mt, {}),
|
|
914
|
+
link: /* @__PURE__ */ e(zt, {}),
|
|
915
|
+
table: /* @__PURE__ */ e(Pt, {}),
|
|
916
|
+
blockquote: /* @__PURE__ */ e(It, {}),
|
|
917
|
+
superscript: /* @__PURE__ */ e(Kt, {}),
|
|
918
|
+
subscript: /* @__PURE__ */ e(jt, {}),
|
|
919
|
+
codeline: /* @__PURE__ */ e(Rt, {}),
|
|
920
|
+
clear: /* @__PURE__ */ e(Ht, {}),
|
|
918
921
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
919
|
-
"|": /* @__PURE__ */
|
|
922
|
+
"|": /* @__PURE__ */ e(
|
|
920
923
|
"div",
|
|
921
924
|
{
|
|
922
925
|
style: {
|
|
@@ -926,7 +929,7 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
926
929
|
}
|
|
927
930
|
}
|
|
928
931
|
)
|
|
929
|
-
},
|
|
932
|
+
}, Xt = [
|
|
930
933
|
"block",
|
|
931
934
|
"fontFamily",
|
|
932
935
|
"|",
|
|
@@ -953,14 +956,14 @@ const at = "_wuContentEditor_399u0_8", dt = "_wuContentEditorTable_399u0_1", ut
|
|
|
953
956
|
"codeline",
|
|
954
957
|
"|",
|
|
955
958
|
"clear"
|
|
956
|
-
],
|
|
957
|
-
const { editor: n, customFonts:
|
|
958
|
-
return /* @__PURE__ */
|
|
959
|
-
|
|
959
|
+
], Yt = (t) => {
|
|
960
|
+
const { editor: n, customFonts: o, children: i, items: r = Xt, ...l } = t;
|
|
961
|
+
return /* @__PURE__ */ e("div", { ...l, children: /* @__PURE__ */ f(Ft, { editor: n, customFonts: o, children: [
|
|
962
|
+
r.map((d, c) => /* @__PURE__ */ e(y, { children: Vt[d] }, d + c)),
|
|
960
963
|
i
|
|
961
964
|
] }) });
|
|
962
|
-
},
|
|
963
|
-
|
|
965
|
+
}, B = gt();
|
|
966
|
+
B.setConfig({
|
|
964
967
|
USE_PROFILES: { html: !0 },
|
|
965
968
|
ALLOWED_TAGS: [
|
|
966
969
|
"div",
|
|
@@ -1012,79 +1015,179 @@ F.setConfig({
|
|
|
1012
1015
|
],
|
|
1013
1016
|
ALLOW_DATA_ATTR: !0
|
|
1014
1017
|
});
|
|
1015
|
-
|
|
1018
|
+
B.addHook("uponSanitizeAttribute", (t, n) => {
|
|
1016
1019
|
if (n.attrName === "style") {
|
|
1017
|
-
const
|
|
1018
|
-
(
|
|
1020
|
+
const o = n.attrValue.toLowerCase();
|
|
1021
|
+
(o.includes("expression") || o.includes("javascript:") || o.includes("url(")) && (n.keepAttr = !1);
|
|
1019
1022
|
}
|
|
1020
1023
|
});
|
|
1021
|
-
function
|
|
1022
|
-
return t ?
|
|
1024
|
+
function I(t) {
|
|
1025
|
+
return t ? B.sanitize(t) : "";
|
|
1026
|
+
}
|
|
1027
|
+
let _ = null;
|
|
1028
|
+
function Zt() {
|
|
1029
|
+
return _ || (_ = import("shiki").then(
|
|
1030
|
+
({ createHighlighter: t }) => t({
|
|
1031
|
+
themes: ["github-light"],
|
|
1032
|
+
langs: ["html"]
|
|
1033
|
+
})
|
|
1034
|
+
)), _;
|
|
1023
1035
|
}
|
|
1024
|
-
function
|
|
1036
|
+
function Qt({
|
|
1025
1037
|
defaultValue: t,
|
|
1026
1038
|
onUpdate: n,
|
|
1027
|
-
|
|
1039
|
+
readonly: o
|
|
1040
|
+
}) {
|
|
1041
|
+
const [i, r] = m.useState(t || ""), [l, d] = m.useState(""), [c, s] = m.useState(!1), [u, w] = m.useState(!1), v = m.useRef(!1), A = m.useCallback(
|
|
1042
|
+
async (b) => {
|
|
1043
|
+
try {
|
|
1044
|
+
const [{ format: C }, { default: k }] = await Promise.all([
|
|
1045
|
+
import("../../standalone-BhI0QomE.js"),
|
|
1046
|
+
import("../../html-Nh3KtWcE.js")
|
|
1047
|
+
]), N = await C(b, {
|
|
1048
|
+
parser: "html",
|
|
1049
|
+
plugins: [k],
|
|
1050
|
+
htmlWhitespaceSensitivity: "css",
|
|
1051
|
+
printWidth: 80
|
|
1052
|
+
});
|
|
1053
|
+
return s(!1), N;
|
|
1054
|
+
} catch (C) {
|
|
1055
|
+
return console.error("Format error:", C), s(!0), b;
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
[]
|
|
1059
|
+
), E = m.useCallback((b) => {
|
|
1060
|
+
Zt().then((C) => {
|
|
1061
|
+
const k = C.codeToHtml(b || " ", {
|
|
1062
|
+
lang: "html",
|
|
1063
|
+
theme: "github-light"
|
|
1064
|
+
});
|
|
1065
|
+
d(k);
|
|
1066
|
+
}).catch((C) => console.error("Highlight error:", C));
|
|
1067
|
+
}, []);
|
|
1068
|
+
m.useEffect(() => {
|
|
1069
|
+
E(i), n && n(I(i));
|
|
1070
|
+
}, [i, E, n]), m.useEffect(() => {
|
|
1071
|
+
v.current || !t || (v.current = !0, A(t).then(r));
|
|
1072
|
+
}, [t, A]);
|
|
1073
|
+
const S = async (b) => {
|
|
1074
|
+
b.preventDefault(), w(!0);
|
|
1075
|
+
const C = await A(i);
|
|
1076
|
+
r(C), w(!1);
|
|
1077
|
+
}, F = async (b) => {
|
|
1078
|
+
b.preventDefault(), w(!0);
|
|
1079
|
+
const C = await A(i);
|
|
1080
|
+
r(C), w(!1), n && n(C);
|
|
1081
|
+
}, L = (b) => {
|
|
1082
|
+
if (b.key === "Tab") {
|
|
1083
|
+
b.preventDefault();
|
|
1084
|
+
const C = b.currentTarget, k = C.selectionStart, N = C.selectionEnd, G = i.substring(0, k) + " " + i.substring(N);
|
|
1085
|
+
r(G), requestAnimationFrame(() => {
|
|
1086
|
+
C.selectionStart = k + 2, C.selectionEnd = k + 2;
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
return /* @__PURE__ */ f(y, { children: [
|
|
1091
|
+
/* @__PURE__ */ f("div", { className: a.wuContentEditorToolbar, "data-position": "top", children: [
|
|
1092
|
+
/* @__PURE__ */ e(
|
|
1093
|
+
"button",
|
|
1094
|
+
{
|
|
1095
|
+
title: "Format Code",
|
|
1096
|
+
className: a.wuContentEditorAction,
|
|
1097
|
+
onClick: S,
|
|
1098
|
+
disabled: u,
|
|
1099
|
+
children: /* @__PURE__ */ e(h, { icon: "wm-ads-click" })
|
|
1100
|
+
}
|
|
1101
|
+
),
|
|
1102
|
+
c && /* @__PURE__ */ e("span", { style: { color: "red" }, children: "Invalid HTML code. Please check" }),
|
|
1103
|
+
/* @__PURE__ */ e(q, { style: { marginLeft: "auto" }, onClick: F, children: "Save" })
|
|
1104
|
+
] }),
|
|
1105
|
+
u ? /* @__PURE__ */ e(y, { children: "Formatting..." }) : /* @__PURE__ */ e("div", { className: a.wuContentEditor, children: /* @__PURE__ */ f("div", { className: a.wuCodeEditor, children: [
|
|
1106
|
+
/* @__PURE__ */ e(
|
|
1107
|
+
"div",
|
|
1108
|
+
{
|
|
1109
|
+
dangerouslySetInnerHTML: { __html: l },
|
|
1110
|
+
className: a.wuCodeEditorPreview
|
|
1111
|
+
}
|
|
1112
|
+
),
|
|
1113
|
+
/* @__PURE__ */ e(
|
|
1114
|
+
"textarea",
|
|
1115
|
+
{
|
|
1116
|
+
value: i,
|
|
1117
|
+
onChange: (b) => r(b.target.value),
|
|
1118
|
+
onKeyDown: L,
|
|
1119
|
+
className: a.wuCodeEditorInput,
|
|
1120
|
+
disabled: o
|
|
1121
|
+
}
|
|
1122
|
+
)
|
|
1123
|
+
] }) })
|
|
1124
|
+
] });
|
|
1125
|
+
}
|
|
1126
|
+
function fe({
|
|
1127
|
+
defaultValue: t,
|
|
1128
|
+
onUpdate: n,
|
|
1129
|
+
className: o,
|
|
1028
1130
|
toolbarPosition: i = "top",
|
|
1029
|
-
customToolbarChildren:
|
|
1030
|
-
toolbarItems:
|
|
1031
|
-
hideToolbar:
|
|
1032
|
-
readonly:
|
|
1033
|
-
customFonts:
|
|
1034
|
-
|
|
1035
|
-
...
|
|
1131
|
+
customToolbarChildren: r,
|
|
1132
|
+
toolbarItems: l,
|
|
1133
|
+
hideToolbar: d,
|
|
1134
|
+
readonly: c,
|
|
1135
|
+
customFonts: s,
|
|
1136
|
+
isHtml: u,
|
|
1137
|
+
...w
|
|
1036
1138
|
}) {
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1139
|
+
const v = V({
|
|
1140
|
+
editable: !c,
|
|
1141
|
+
extensions: St,
|
|
1142
|
+
content: I(t || ""),
|
|
1143
|
+
onUpdate: ({ editor: A }) => {
|
|
1144
|
+
n && n(I(A.getHTML()));
|
|
1042
1145
|
}
|
|
1043
1146
|
});
|
|
1044
|
-
return
|
|
1045
|
-
"div",
|
|
1046
|
-
{
|
|
1047
|
-
className: D(d.wuContentEditor, e),
|
|
1048
|
-
dangerouslySetInnerHTML: {
|
|
1049
|
-
__html: A(u ? t || "" : w.getHTML())
|
|
1050
|
-
},
|
|
1051
|
-
...p
|
|
1052
|
-
}
|
|
1053
|
-
)) : /* @__PURE__ */ g(
|
|
1147
|
+
return /* @__PURE__ */ e(
|
|
1054
1148
|
"div",
|
|
1055
1149
|
{
|
|
1056
|
-
className:
|
|
1150
|
+
className: Y(a.wuContentEditorContainer, o),
|
|
1057
1151
|
"data-position": i,
|
|
1058
1152
|
"data-slot": "wu-content-editor-container",
|
|
1059
1153
|
onClick: () => {
|
|
1060
|
-
|
|
1154
|
+
v == null || v.chain().focus().run();
|
|
1061
1155
|
},
|
|
1062
|
-
...
|
|
1063
|
-
children:
|
|
1064
|
-
|
|
1065
|
-
|
|
1156
|
+
...w,
|
|
1157
|
+
children: u ? /* @__PURE__ */ e(
|
|
1158
|
+
Qt,
|
|
1159
|
+
{
|
|
1160
|
+
defaultValue: t,
|
|
1161
|
+
onUpdate: n,
|
|
1162
|
+
"data-position": i,
|
|
1163
|
+
"data-slot": "wu-content-editor-toolbar",
|
|
1164
|
+
readonly: c
|
|
1165
|
+
}
|
|
1166
|
+
) : /* @__PURE__ */ f(y, { children: [
|
|
1167
|
+
!d && /* @__PURE__ */ e(
|
|
1168
|
+
Yt,
|
|
1066
1169
|
{
|
|
1067
|
-
editor:
|
|
1068
|
-
customFonts:
|
|
1069
|
-
className:
|
|
1070
|
-
items:
|
|
1170
|
+
editor: v,
|
|
1171
|
+
customFonts: s,
|
|
1172
|
+
className: a.wuContentEditorToolbar,
|
|
1173
|
+
items: l,
|
|
1071
1174
|
"data-slot": "wu-content-editor-toolbar",
|
|
1072
1175
|
"data-position": i,
|
|
1073
|
-
children:
|
|
1176
|
+
children: r
|
|
1074
1177
|
}
|
|
1075
1178
|
),
|
|
1076
|
-
/* @__PURE__ */
|
|
1077
|
-
|
|
1179
|
+
/* @__PURE__ */ e(
|
|
1180
|
+
X,
|
|
1078
1181
|
{
|
|
1079
|
-
editor:
|
|
1080
|
-
className:
|
|
1182
|
+
editor: v,
|
|
1183
|
+
className: a.wuContentEditor,
|
|
1081
1184
|
"data-slot": "wu-content-editor"
|
|
1082
1185
|
}
|
|
1083
1186
|
)
|
|
1084
|
-
]
|
|
1187
|
+
] })
|
|
1085
1188
|
}
|
|
1086
1189
|
);
|
|
1087
1190
|
}
|
|
1088
1191
|
export {
|
|
1089
|
-
|
|
1192
|
+
fe as WuContentEditor
|
|
1090
1193
|
};
|