@ryzeup/richtexteditor 1.0.22 → 1.0.24
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/index.es.js +398 -387
- package/dist/index.js +3 -3
- package/dist/index.umd.js +4 -4
- package/dist/richtexteditor.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -11,7 +11,7 @@ var Ae = (r, s, d) => s in r ? ut(r, s, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
return r;
|
|
12
12
|
}, ie = (r, s) => mt(r, gt(s));
|
|
13
13
|
import * as pt from "react";
|
|
14
|
-
import
|
|
14
|
+
import l, { useRef as U, useState as k, useEffect as F } from "react";
|
|
15
15
|
import { createPortal as vt } from "react-dom";
|
|
16
16
|
window.React = pt;
|
|
17
17
|
var Te = {
|
|
@@ -20,14 +20,14 @@ var Te = {
|
|
|
20
20
|
className: void 0,
|
|
21
21
|
style: void 0,
|
|
22
22
|
attr: void 0
|
|
23
|
-
}, Me =
|
|
23
|
+
}, Me = l.createContext && /* @__PURE__ */ l.createContext(Te), yt = ["attr", "size", "title"];
|
|
24
24
|
function Et(r, s) {
|
|
25
25
|
if (r == null) return {};
|
|
26
|
-
var d = wt(r, s), m,
|
|
26
|
+
var d = wt(r, s), m, y;
|
|
27
27
|
if (Object.getOwnPropertySymbols) {
|
|
28
28
|
var w = Object.getOwnPropertySymbols(r);
|
|
29
|
-
for (
|
|
30
|
-
m = w[
|
|
29
|
+
for (y = 0; y < w.length; y++)
|
|
30
|
+
m = w[y], !(s.indexOf(m) >= 0) && Object.prototype.propertyIsEnumerable.call(r, m) && (d[m] = r[m]);
|
|
31
31
|
}
|
|
32
32
|
return d;
|
|
33
33
|
}
|
|
@@ -55,8 +55,8 @@ function ze(r, s) {
|
|
|
55
55
|
var d = Object.keys(r);
|
|
56
56
|
if (Object.getOwnPropertySymbols) {
|
|
57
57
|
var m = Object.getOwnPropertySymbols(r);
|
|
58
|
-
s && (m = m.filter(function(
|
|
59
|
-
return Object.getOwnPropertyDescriptor(r,
|
|
58
|
+
s && (m = m.filter(function(y) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(r, y).enumerable;
|
|
60
60
|
})), d.push.apply(d, m);
|
|
61
61
|
}
|
|
62
62
|
return d;
|
|
@@ -90,12 +90,12 @@ function Rt(r, s) {
|
|
|
90
90
|
return (s === "string" ? String : Number)(r);
|
|
91
91
|
}
|
|
92
92
|
function De(r) {
|
|
93
|
-
return r && r.map((s, d) => /* @__PURE__ */
|
|
93
|
+
return r && r.map((s, d) => /* @__PURE__ */ l.createElement(s.tag, G({
|
|
94
94
|
key: d
|
|
95
95
|
}, s.attr), De(s.child)));
|
|
96
96
|
}
|
|
97
97
|
function N(r) {
|
|
98
|
-
return (s) => /* @__PURE__ */
|
|
98
|
+
return (s) => /* @__PURE__ */ l.createElement(xt, J({
|
|
99
99
|
attr: G({}, r.attr)
|
|
100
100
|
}, s), De(r.child));
|
|
101
101
|
}
|
|
@@ -103,10 +103,10 @@ function xt(r) {
|
|
|
103
103
|
var s = (d) => {
|
|
104
104
|
var {
|
|
105
105
|
attr: m,
|
|
106
|
-
size:
|
|
106
|
+
size: y,
|
|
107
107
|
title: w
|
|
108
|
-
} = r, R = Et(r, yt), M =
|
|
109
|
-
return d.className && (E = d.className), r.className && (E = (E ? E + " " : "") + r.className), /* @__PURE__ */
|
|
108
|
+
} = r, R = Et(r, yt), M = y || d.size || "1em", E;
|
|
109
|
+
return d.className && (E = d.className), r.className && (E = (E ? E + " " : "") + r.className), /* @__PURE__ */ l.createElement("svg", J({
|
|
110
110
|
stroke: "currentColor",
|
|
111
111
|
fill: "currentColor",
|
|
112
112
|
strokeWidth: "0"
|
|
@@ -118,9 +118,9 @@ function xt(r) {
|
|
|
118
118
|
height: M,
|
|
119
119
|
width: M,
|
|
120
120
|
xmlns: "http://www.w3.org/2000/svg"
|
|
121
|
-
}), w && /* @__PURE__ */
|
|
121
|
+
}), w && /* @__PURE__ */ l.createElement("title", null, w), r.children);
|
|
122
122
|
};
|
|
123
|
-
return Me !== void 0 ? /* @__PURE__ */
|
|
123
|
+
return Me !== void 0 ? /* @__PURE__ */ l.createElement(Me.Consumer, null, (d) => s(d)) : s(Te);
|
|
124
124
|
}
|
|
125
125
|
function Lt(r) {
|
|
126
126
|
return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z" }, child: [] }] })(r);
|
|
@@ -149,10 +149,10 @@ function Tt(r) {
|
|
|
149
149
|
function Dt(r) {
|
|
150
150
|
return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z" }, child: [] }] })(r);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Ot(r) {
|
|
153
153
|
return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(r);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ht(r) {
|
|
156
156
|
return N({ attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm194.8 170.2C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.6-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.4-16.2 38.1 4.2 24.6 20.5z" }, child: [] }] })(r);
|
|
157
157
|
}
|
|
158
158
|
function _t(r) {
|
|
@@ -161,10 +161,10 @@ function _t(r) {
|
|
|
161
161
|
function jt(r) {
|
|
162
162
|
return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(r);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ft(r) {
|
|
165
165
|
return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M2 20h20v4H2v-4zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5L5.49 17zm4.42-5.61 2.03-5.79h.12l2.03 5.79H9.91z" }, child: [] }] })(r);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function It(r) {
|
|
168
168
|
return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M20 8V5H6.39l3 3h1.83l-.55 1.28 2.09 2.1L14.21 8zM3.41 4.86 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21l1.41-1.41z" }, child: [] }] })(r);
|
|
169
169
|
}
|
|
170
170
|
const Pt = [
|
|
@@ -284,7 +284,7 @@ const Pt = [
|
|
|
284
284
|
saveSelection: s,
|
|
285
285
|
handleFileChange: d,
|
|
286
286
|
handleFontSizeChange: m,
|
|
287
|
-
handleFontFamilyChange:
|
|
287
|
+
handleFontFamilyChange: y,
|
|
288
288
|
// insertListBlock,
|
|
289
289
|
insertEmoji: w,
|
|
290
290
|
handleLink: R,
|
|
@@ -293,18 +293,18 @@ const Pt = [
|
|
|
293
293
|
className: x,
|
|
294
294
|
style: L
|
|
295
295
|
}) => {
|
|
296
|
-
var $,
|
|
297
|
-
const A =
|
|
296
|
+
var $, H;
|
|
297
|
+
const A = U(null), P = U(null), T = U(null), [q, B] = k(!1), [I, _] = k({
|
|
298
298
|
x: 0,
|
|
299
299
|
y: 0
|
|
300
300
|
});
|
|
301
|
-
|
|
301
|
+
F(() => {
|
|
302
302
|
const h = (C) => {
|
|
303
303
|
!C.target.closest(".rte-emoji-popup") && !C.target.closest("button[title='Emoji']") && B(!1);
|
|
304
304
|
};
|
|
305
305
|
return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
|
|
306
306
|
}, []);
|
|
307
|
-
const
|
|
307
|
+
const V = (h) => {
|
|
308
308
|
var j;
|
|
309
309
|
h.preventDefault();
|
|
310
310
|
const C = h.currentTarget.dataset.command;
|
|
@@ -346,7 +346,7 @@ const Pt = [
|
|
|
346
346
|
color: !1,
|
|
347
347
|
highlight: !1
|
|
348
348
|
});
|
|
349
|
-
return
|
|
349
|
+
return F(() => {
|
|
350
350
|
const h = () => {
|
|
351
351
|
D({
|
|
352
352
|
bold: document.queryCommandState("bold"),
|
|
@@ -367,52 +367,52 @@ const Pt = [
|
|
|
367
367
|
});
|
|
368
368
|
};
|
|
369
369
|
return document.addEventListener("selectionchange", h), () => document.removeEventListener("selectionchange", h);
|
|
370
|
-
}, []), /* @__PURE__ */
|
|
370
|
+
}, []), /* @__PURE__ */ l.createElement("div", {
|
|
371
371
|
className: `rte-toolbar ${x || ""}`,
|
|
372
372
|
style: L
|
|
373
|
-
}, E.bold && /* @__PURE__ */
|
|
373
|
+
}, E.bold && /* @__PURE__ */ l.createElement("button", {
|
|
374
374
|
"data-command": "bold",
|
|
375
375
|
title: "Bold",
|
|
376
|
-
onMouseDown:
|
|
376
|
+
onMouseDown: V,
|
|
377
377
|
className: z.bold ? "rte-active" : ""
|
|
378
|
-
}, /* @__PURE__ */
|
|
378
|
+
}, /* @__PURE__ */ l.createElement(kt, null)), E.italic && /* @__PURE__ */ l.createElement("button", {
|
|
379
379
|
"data-command": "italic",
|
|
380
380
|
title: "Italic",
|
|
381
|
-
onMouseDown:
|
|
381
|
+
onMouseDown: V,
|
|
382
382
|
className: z.italic ? "rte-active" : ""
|
|
383
|
-
}, /* @__PURE__ */
|
|
383
|
+
}, /* @__PURE__ */ l.createElement(Tt, null)), E.underline && /* @__PURE__ */ l.createElement("button", {
|
|
384
384
|
"data-command": "underline",
|
|
385
385
|
title: "Underline",
|
|
386
|
-
onMouseDown:
|
|
386
|
+
onMouseDown: V,
|
|
387
387
|
className: z.underline ? "rte-active" : ""
|
|
388
|
-
}, /* @__PURE__ */
|
|
388
|
+
}, /* @__PURE__ */ l.createElement(jt, null)), E.unorderedList && /* @__PURE__ */ l.createElement("button", {
|
|
389
389
|
"data-command": "insertUnorderedList",
|
|
390
|
-
onMouseDown:
|
|
390
|
+
onMouseDown: V,
|
|
391
391
|
title: "UnorderedList",
|
|
392
392
|
className: z.unorderedList ? "rte-active" : ""
|
|
393
|
-
}, /* @__PURE__ */
|
|
393
|
+
}, /* @__PURE__ */ l.createElement(Ot, null)), E.orderedList && /* @__PURE__ */ l.createElement("button", {
|
|
394
394
|
"data-command": "insertOrderedList",
|
|
395
395
|
title: "OrderedList",
|
|
396
|
-
onMouseDown:
|
|
396
|
+
onMouseDown: V,
|
|
397
397
|
className: z.orderedList ? "rte-active" : ""
|
|
398
|
-
}, /* @__PURE__ */
|
|
398
|
+
}, /* @__PURE__ */ l.createElement(Mt, null)), E.link && /* @__PURE__ */ l.createElement("button", {
|
|
399
399
|
"data-command": "createLink",
|
|
400
400
|
title: "Link",
|
|
401
401
|
onClick: R,
|
|
402
402
|
className: z.link ? "rte-active" : ""
|
|
403
|
-
}, /* @__PURE__ */
|
|
403
|
+
}, /* @__PURE__ */ l.createElement(Dt, null)), E.removeFormat && /* @__PURE__ */ l.createElement("button", {
|
|
404
404
|
"data-command": "Remove format",
|
|
405
405
|
title: "removeFormat",
|
|
406
406
|
onMouseDown: (h) => {
|
|
407
407
|
h.preventDefault(), s(), M();
|
|
408
408
|
},
|
|
409
409
|
className: z.removeFormat ? "rte-active" : ""
|
|
410
|
-
}, /* @__PURE__ */
|
|
410
|
+
}, /* @__PURE__ */ l.createElement(It, null)), E.image && /* @__PURE__ */ l.createElement("button", {
|
|
411
411
|
"data-command": "insertImage",
|
|
412
412
|
title: "Image",
|
|
413
|
-
onMouseDown:
|
|
413
|
+
onMouseDown: V,
|
|
414
414
|
className: z.image ? "rte-active" : ""
|
|
415
|
-
}, /* @__PURE__ */
|
|
415
|
+
}, /* @__PURE__ */ l.createElement(At, null)), /* @__PURE__ */ l.createElement("input", {
|
|
416
416
|
type: "file",
|
|
417
417
|
accept: "image/*",
|
|
418
418
|
ref: A,
|
|
@@ -420,11 +420,11 @@ const Pt = [
|
|
|
420
420
|
display: "none"
|
|
421
421
|
},
|
|
422
422
|
onChange: d
|
|
423
|
-
}), E.emoji && /* @__PURE__ */
|
|
423
|
+
}), E.emoji && /* @__PURE__ */ l.createElement("div", {
|
|
424
424
|
style: {
|
|
425
425
|
position: "relative"
|
|
426
426
|
}
|
|
427
|
-
}, /* @__PURE__ */
|
|
427
|
+
}, /* @__PURE__ */ l.createElement("button", {
|
|
428
428
|
title: "Emoji",
|
|
429
429
|
onMouseDown: (h) => {
|
|
430
430
|
h.preventDefault(), s();
|
|
@@ -436,13 +436,13 @@ const Pt = [
|
|
|
436
436
|
}), B((j) => !j);
|
|
437
437
|
},
|
|
438
438
|
className: z.emoji ? "rte-active" : ""
|
|
439
|
-
}, /* @__PURE__ */
|
|
439
|
+
}, /* @__PURE__ */ l.createElement(Ht, null)), q && /* @__PURE__ */ vt(/* @__PURE__ */ l.createElement("div", {
|
|
440
440
|
className: "rte-emoji-popup",
|
|
441
441
|
style: {
|
|
442
|
-
top:
|
|
443
|
-
left:
|
|
442
|
+
top: I.y,
|
|
443
|
+
left: I.x
|
|
444
444
|
}
|
|
445
|
-
}, Pt.map((h, C) => /* @__PURE__ */
|
|
445
|
+
}, Pt.map((h, C) => /* @__PURE__ */ l.createElement("span", {
|
|
446
446
|
key: C,
|
|
447
447
|
style: {
|
|
448
448
|
fontSize: "20px",
|
|
@@ -452,11 +452,11 @@ const Pt = [
|
|
|
452
452
|
onMouseDown: (j) => {
|
|
453
453
|
j.preventDefault(), w(h), B(!1);
|
|
454
454
|
}
|
|
455
|
-
}, h))), document.body)), E.color && /* @__PURE__ */
|
|
455
|
+
}, h))), document.body)), E.color && /* @__PURE__ */ l.createElement("div", {
|
|
456
456
|
style: {
|
|
457
457
|
position: "relative"
|
|
458
458
|
}
|
|
459
|
-
}, /* @__PURE__ */
|
|
459
|
+
}, /* @__PURE__ */ l.createElement("button", {
|
|
460
460
|
title: "Text Color",
|
|
461
461
|
onMouseDown: (h) => {
|
|
462
462
|
var C;
|
|
@@ -470,7 +470,7 @@ const Pt = [
|
|
|
470
470
|
fontSize: "18px"
|
|
471
471
|
},
|
|
472
472
|
className: z.color ? "rte-active" : ""
|
|
473
|
-
}, /* @__PURE__ */
|
|
473
|
+
}, /* @__PURE__ */ l.createElement(Ft, null)), /* @__PURE__ */ l.createElement("input", {
|
|
474
474
|
ref: P,
|
|
475
475
|
type: "color",
|
|
476
476
|
defaultValue: "#000000",
|
|
@@ -485,11 +485,11 @@ const Pt = [
|
|
|
485
485
|
height: 0,
|
|
486
486
|
pointerEvents: "none"
|
|
487
487
|
}
|
|
488
|
-
})), E.highlight && /* @__PURE__ */
|
|
488
|
+
})), E.highlight && /* @__PURE__ */ l.createElement("div", {
|
|
489
489
|
style: {
|
|
490
490
|
position: "relative"
|
|
491
491
|
}
|
|
492
|
-
}, /* @__PURE__ */
|
|
492
|
+
}, /* @__PURE__ */ l.createElement("button", {
|
|
493
493
|
title: "Highlight",
|
|
494
494
|
onMouseDown: (h) => {
|
|
495
495
|
var C;
|
|
@@ -499,11 +499,11 @@ const Pt = [
|
|
|
499
499
|
display: "flex",
|
|
500
500
|
alignItems: "center",
|
|
501
501
|
justifyContent: "center",
|
|
502
|
-
color: ((
|
|
502
|
+
color: ((H = T.current) == null ? void 0 : H.value) || "#000",
|
|
503
503
|
fontSize: "18px"
|
|
504
504
|
},
|
|
505
505
|
className: z.highlight ? "rte-active" : ""
|
|
506
|
-
}, /* @__PURE__ */
|
|
506
|
+
}, /* @__PURE__ */ l.createElement(Nt, null)), /* @__PURE__ */ l.createElement("input", {
|
|
507
507
|
ref: T,
|
|
508
508
|
type: "color",
|
|
509
509
|
onChange: (h) => {
|
|
@@ -518,55 +518,55 @@ const Pt = [
|
|
|
518
518
|
height: 0,
|
|
519
519
|
pointerEvents: "none"
|
|
520
520
|
}
|
|
521
|
-
})), E.align && /* @__PURE__ */
|
|
521
|
+
})), E.align && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("button", {
|
|
522
522
|
title: "Align Left",
|
|
523
523
|
onMouseDown: (h) => h.preventDefault(),
|
|
524
524
|
onClick: () => r("justifyLeft"),
|
|
525
525
|
className: z.alignLeft ? "rte-active" : ""
|
|
526
|
-
}, /* @__PURE__ */
|
|
526
|
+
}, /* @__PURE__ */ l.createElement(zt, null)), /* @__PURE__ */ l.createElement("button", {
|
|
527
527
|
title: "Align Center",
|
|
528
528
|
onMouseDown: (h) => h.preventDefault(),
|
|
529
529
|
onClick: () => r("justifyCenter"),
|
|
530
530
|
className: z.alignCenter ? "rte-active" : ""
|
|
531
|
-
}, /* @__PURE__ */
|
|
531
|
+
}, /* @__PURE__ */ l.createElement(Lt, null)), /* @__PURE__ */ l.createElement("button", {
|
|
532
532
|
title: "Align Right",
|
|
533
533
|
onMouseDown: (h) => h.preventDefault(),
|
|
534
534
|
onClick: () => r("justifyRight"),
|
|
535
535
|
className: z.alignRight ? "rte-active" : ""
|
|
536
|
-
}, /* @__PURE__ */
|
|
536
|
+
}, /* @__PURE__ */ l.createElement(St, null))), E.table && /* @__PURE__ */ l.createElement("button", {
|
|
537
537
|
title: "Insert Table",
|
|
538
538
|
onMouseDown: (h) => h.preventDefault(),
|
|
539
539
|
onClick: () => r("insertTable"),
|
|
540
540
|
className: z.table ? "rte-active" : ""
|
|
541
|
-
}, /* @__PURE__ */
|
|
541
|
+
}, /* @__PURE__ */ l.createElement(_t, null)), E.fontFamily && /* @__PURE__ */ l.createElement("select", {
|
|
542
542
|
className: "rte-dropdown",
|
|
543
543
|
defaultValue: "",
|
|
544
544
|
onMouseDown: () => s(),
|
|
545
|
-
onChange:
|
|
546
|
-
}, /* @__PURE__ */
|
|
545
|
+
onChange: y
|
|
546
|
+
}, /* @__PURE__ */ l.createElement("option", {
|
|
547
547
|
value: "",
|
|
548
548
|
disabled: !0
|
|
549
|
-
}, "Font Family"), /* @__PURE__ */
|
|
549
|
+
}, "Font Family"), /* @__PURE__ */ l.createElement("option", {
|
|
550
550
|
value: "Arial"
|
|
551
|
-
}, "Arial"), /* @__PURE__ */
|
|
551
|
+
}, "Arial"), /* @__PURE__ */ l.createElement("option", {
|
|
552
552
|
value: "Georgia"
|
|
553
|
-
}, "Georgia"), /* @__PURE__ */
|
|
553
|
+
}, "Georgia"), /* @__PURE__ */ l.createElement("option", {
|
|
554
554
|
value: "Times New Roman"
|
|
555
|
-
}, "Times New Roman"), /* @__PURE__ */
|
|
555
|
+
}, "Times New Roman"), /* @__PURE__ */ l.createElement("option", {
|
|
556
556
|
value: "Courier New"
|
|
557
|
-
}, "Courier New"), /* @__PURE__ */
|
|
557
|
+
}, "Courier New"), /* @__PURE__ */ l.createElement("option", {
|
|
558
558
|
value: "Verdana"
|
|
559
|
-
}, "Verdana")), E.fontSize && /* @__PURE__ */
|
|
559
|
+
}, "Verdana")), E.fontSize && /* @__PURE__ */ l.createElement("select", {
|
|
560
560
|
className: "rte-dropdown rte-fontsize-dropdown",
|
|
561
561
|
defaultValue: "",
|
|
562
562
|
onMouseDown: () => s(),
|
|
563
563
|
onChange: m
|
|
564
|
-
}, /* @__PURE__ */
|
|
564
|
+
}, /* @__PURE__ */ l.createElement("option", {
|
|
565
565
|
value: "",
|
|
566
566
|
disabled: !0
|
|
567
567
|
}, "Font Size"), Array.from({
|
|
568
568
|
length: 16
|
|
569
|
-
}, (h, C) => 10 + C).map((h) => /* @__PURE__ */
|
|
569
|
+
}, (h, C) => 10 + C).map((h) => /* @__PURE__ */ l.createElement("option", {
|
|
570
570
|
key: h,
|
|
571
571
|
value: h
|
|
572
572
|
}, h, "px"))));
|
|
@@ -575,20 +575,20 @@ const Pt = [
|
|
|
575
575
|
position: s,
|
|
576
576
|
filtered: d,
|
|
577
577
|
insertMention: m,
|
|
578
|
-
onClose:
|
|
578
|
+
onClose: y,
|
|
579
579
|
query: w
|
|
580
580
|
}) => {
|
|
581
|
-
const R =
|
|
582
|
-
return
|
|
581
|
+
const R = U(null), [M, E] = k(0);
|
|
582
|
+
return F(() => {
|
|
583
583
|
r && E(0);
|
|
584
|
-
}, [r]),
|
|
584
|
+
}, [r]), F(() => {
|
|
585
585
|
const x = (L) => {
|
|
586
|
-
R.current && !R.current.contains(L.target) &&
|
|
586
|
+
R.current && !R.current.contains(L.target) && y();
|
|
587
587
|
};
|
|
588
588
|
return r && document.addEventListener("mousedown", x), () => {
|
|
589
589
|
document.removeEventListener("mousedown", x);
|
|
590
590
|
};
|
|
591
|
-
}, [r,
|
|
591
|
+
}, [r, y]), F(() => {
|
|
592
592
|
if (!r) return;
|
|
593
593
|
const x = (L) => {
|
|
594
594
|
if (!(!r || d.length === 0) && (L.key === "ArrowDown" && (L.preventDefault(), E((A) => Math.min(A + 1, d.length - 1))), L.key === "ArrowUp" && (L.preventDefault(), E((A) => Math.max(A - 1, 0))), L.key === "Enter")) {
|
|
@@ -598,14 +598,14 @@ const Pt = [
|
|
|
598
598
|
}
|
|
599
599
|
};
|
|
600
600
|
return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
|
|
601
|
-
}, [r, d, M]),
|
|
601
|
+
}, [r, d, M]), F(() => {
|
|
602
602
|
if (!R.current) return;
|
|
603
603
|
const L = R.current.querySelectorAll("li")[M];
|
|
604
604
|
L && L.scrollIntoView({
|
|
605
605
|
block: "nearest",
|
|
606
606
|
behavior: "smooth"
|
|
607
607
|
});
|
|
608
|
-
}, [M]), r ? /* @__PURE__ */
|
|
608
|
+
}, [M]), r ? /* @__PURE__ */ l.createElement("ul", {
|
|
609
609
|
ref: R,
|
|
610
610
|
className: "rte-popup",
|
|
611
611
|
style: {
|
|
@@ -619,13 +619,13 @@ const Pt = [
|
|
|
619
619
|
const P = x.toLowerCase(), T = w.toLowerCase(), q = P.indexOf(T);
|
|
620
620
|
let B = x;
|
|
621
621
|
if (q !== -1 && w.length > 0) {
|
|
622
|
-
const
|
|
623
|
-
B = x.substring(0, q) + `<span class="rte-highlight">${x.substring(q,
|
|
622
|
+
const I = q + w.length;
|
|
623
|
+
B = x.substring(0, q) + `<span class="rte-highlight">${x.substring(q, I)}</span>` + x.substring(I);
|
|
624
624
|
}
|
|
625
|
-
return /* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ l.createElement("li", {
|
|
626
626
|
key: L,
|
|
627
|
-
onMouseDown: (
|
|
628
|
-
|
|
627
|
+
onMouseDown: (I) => {
|
|
628
|
+
I.preventDefault(), m({
|
|
629
629
|
name: x,
|
|
630
630
|
value: L
|
|
631
631
|
});
|
|
@@ -641,7 +641,7 @@ const Pt = [
|
|
|
641
641
|
},
|
|
642
642
|
onMouseEnter: () => E(A)
|
|
643
643
|
});
|
|
644
|
-
}) : /* @__PURE__ */
|
|
644
|
+
}) : /* @__PURE__ */ l.createElement("li", {
|
|
645
645
|
style: {
|
|
646
646
|
padding: "6px 12px",
|
|
647
647
|
color: "#999"
|
|
@@ -654,36 +654,36 @@ function ke(r) {
|
|
|
654
654
|
function Q(r) {
|
|
655
655
|
return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Plus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,12.5H12.5V15a.5.5,0,0,1-1,0V12.5H9a.5.5,0,0,1,0-1h2.5V9a.5.5,0,0,1,1,0v2.5H15A.5.5,0,0,1,15,12.5Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.932A9.934,9.934,0,1,1,21.932,12,9.944,9.944,0,0,1,12,21.932ZM12,3.065A8.934,8.934,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.065Z" }, child: [] }] }] }] })(r);
|
|
656
656
|
}
|
|
657
|
-
const
|
|
657
|
+
const Vt = ({
|
|
658
658
|
visible: r,
|
|
659
659
|
x: s,
|
|
660
660
|
y: d,
|
|
661
661
|
onAction: m,
|
|
662
|
-
onClose:
|
|
662
|
+
onClose: y
|
|
663
663
|
}) => {
|
|
664
664
|
if (!r) return null;
|
|
665
665
|
const w = {
|
|
666
666
|
top: d,
|
|
667
667
|
left: s
|
|
668
668
|
};
|
|
669
|
-
return /* @__PURE__ */
|
|
669
|
+
return /* @__PURE__ */ l.createElement("div", {
|
|
670
670
|
style: w,
|
|
671
671
|
className: "rte-table-menu",
|
|
672
|
-
onMouseLeave:
|
|
673
|
-
}, /* @__PURE__ */
|
|
672
|
+
onMouseLeave: y
|
|
673
|
+
}, /* @__PURE__ */ l.createElement("button", {
|
|
674
674
|
onClick: () => m("insertRowAbove")
|
|
675
|
-
}, /* @__PURE__ */
|
|
675
|
+
}, /* @__PURE__ */ l.createElement(Q, null), " Insert row above"), /* @__PURE__ */ l.createElement("button", {
|
|
676
676
|
onClick: () => m("insertRowBelow")
|
|
677
|
-
}, /* @__PURE__ */
|
|
677
|
+
}, /* @__PURE__ */ l.createElement(Q, null), " Insert row below"), /* @__PURE__ */ l.createElement("button", {
|
|
678
678
|
onClick: () => m("insertColLeft")
|
|
679
|
-
}, /* @__PURE__ */
|
|
679
|
+
}, /* @__PURE__ */ l.createElement(Q, null), " Insert col left"), /* @__PURE__ */ l.createElement("button", {
|
|
680
680
|
onClick: () => m("insertColRight")
|
|
681
|
-
}, /* @__PURE__ */
|
|
681
|
+
}, /* @__PURE__ */ l.createElement(Q, null), " Insert col right"), /* @__PURE__ */ l.createElement("button", {
|
|
682
682
|
onClick: () => m("deleteRow")
|
|
683
|
-
}, /* @__PURE__ */
|
|
683
|
+
}, /* @__PURE__ */ l.createElement(ke, null), " Delete row"), /* @__PURE__ */ l.createElement("button", {
|
|
684
684
|
onClick: () => m("deleteCol")
|
|
685
|
-
}, /* @__PURE__ */
|
|
686
|
-
},
|
|
685
|
+
}, /* @__PURE__ */ l.createElement(ke, null), " Delete column"));
|
|
686
|
+
}, Ut = ({
|
|
687
687
|
html: r,
|
|
688
688
|
className: s,
|
|
689
689
|
style: d
|
|
@@ -695,16 +695,16 @@ const Ut = ({
|
|
|
695
695
|
const M = R.href;
|
|
696
696
|
M && window.open(M, "_blank", "noopener,noreferrer");
|
|
697
697
|
}
|
|
698
|
-
},
|
|
698
|
+
}, y = (w) => {
|
|
699
699
|
let R = w.replace(/{{\s*(.*?)\s*}}/g, (M, E) => `<span style="color: blue">${E}</span>`);
|
|
700
700
|
return R = R.replace(/#arrayData/g, ""), R = R.replace(/\/arrayData/g, ""), R;
|
|
701
701
|
};
|
|
702
|
-
return /* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ l.createElement("div", {
|
|
703
703
|
className: `rte-preview ${s || ""}`,
|
|
704
704
|
style: d,
|
|
705
705
|
onClick: m,
|
|
706
706
|
dangerouslySetInnerHTML: {
|
|
707
|
-
__html:
|
|
707
|
+
__html: y(r)
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
710
|
}, $t = ({
|
|
@@ -713,57 +713,57 @@ const Ut = ({
|
|
|
713
713
|
onClose: d,
|
|
714
714
|
onInsert: m
|
|
715
715
|
}) => {
|
|
716
|
-
const [
|
|
717
|
-
if (
|
|
716
|
+
const [y, w] = k(""), [R, M] = k(""), [E, x] = k(""), [L, A] = k("_self");
|
|
717
|
+
if (F(() => {
|
|
718
718
|
r ? (w(s.url || ""), M(s.text || ""), x(s.title || ""), A(s.target || "_self")) : (w(""), M(""), x(""), A("_self"));
|
|
719
719
|
}, [r, s]), !r) return null;
|
|
720
720
|
const P = () => {
|
|
721
721
|
m({
|
|
722
|
-
url:
|
|
722
|
+
url: y,
|
|
723
723
|
text: R,
|
|
724
724
|
title: E,
|
|
725
725
|
target: L
|
|
726
726
|
});
|
|
727
727
|
};
|
|
728
|
-
return /* @__PURE__ */
|
|
728
|
+
return /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("div", {
|
|
729
729
|
className: "rte-link-modal-overlay",
|
|
730
730
|
onClick: d
|
|
731
|
-
}), /* @__PURE__ */
|
|
731
|
+
}), /* @__PURE__ */ l.createElement("div", {
|
|
732
732
|
className: "rte-link-modal"
|
|
733
|
-
}, /* @__PURE__ */
|
|
733
|
+
}, /* @__PURE__ */ l.createElement("h4", {
|
|
734
734
|
className: "rte-link-modal__title"
|
|
735
|
-
},
|
|
735
|
+
}, y ? "Edit Link" : "Insert Link"), /* @__PURE__ */ l.createElement("input", {
|
|
736
736
|
type: "text",
|
|
737
737
|
className: "rte-link-modal__input",
|
|
738
738
|
placeholder: "URL",
|
|
739
|
-
value:
|
|
739
|
+
value: y,
|
|
740
740
|
onChange: (T) => w(T.target.value)
|
|
741
|
-
}), /* @__PURE__ */
|
|
741
|
+
}), /* @__PURE__ */ l.createElement("input", {
|
|
742
742
|
type: "text",
|
|
743
743
|
className: "rte-link-modal__input",
|
|
744
744
|
placeholder: "Text to Display",
|
|
745
745
|
value: R,
|
|
746
746
|
onChange: (T) => M(T.target.value)
|
|
747
|
-
}), /* @__PURE__ */
|
|
747
|
+
}), /* @__PURE__ */ l.createElement("input", {
|
|
748
748
|
type: "text",
|
|
749
749
|
className: "rte-link-modal__input",
|
|
750
750
|
placeholder: "Title",
|
|
751
751
|
value: E,
|
|
752
752
|
onChange: (T) => x(T.target.value)
|
|
753
|
-
}), /* @__PURE__ */
|
|
753
|
+
}), /* @__PURE__ */ l.createElement("select", {
|
|
754
754
|
className: "rte-link-modal__select",
|
|
755
755
|
value: L,
|
|
756
756
|
onChange: (T) => A(T.target.value)
|
|
757
|
-
}, /* @__PURE__ */
|
|
757
|
+
}, /* @__PURE__ */ l.createElement("option", {
|
|
758
758
|
value: "_self"
|
|
759
|
-
}, "Same tab"), /* @__PURE__ */
|
|
759
|
+
}, "Same tab"), /* @__PURE__ */ l.createElement("option", {
|
|
760
760
|
value: "_blank"
|
|
761
|
-
}, "New tab")), /* @__PURE__ */
|
|
761
|
+
}, "New tab")), /* @__PURE__ */ l.createElement("div", {
|
|
762
762
|
className: "rte-link-modal__actions"
|
|
763
|
-
}, /* @__PURE__ */
|
|
763
|
+
}, /* @__PURE__ */ l.createElement("button", {
|
|
764
764
|
className: "rte-link-modal__btn",
|
|
765
765
|
onClick: d
|
|
766
|
-
}, "Cancel"), /* @__PURE__ */
|
|
766
|
+
}, "Cancel"), /* @__PURE__ */ l.createElement("button", {
|
|
767
767
|
className: "rte-link-modal__btn rte-link-modal__btn--ok",
|
|
768
768
|
onClick: P
|
|
769
769
|
}, "OK"))));
|
|
@@ -791,7 +791,7 @@ const Yt = ({
|
|
|
791
791
|
fontSize: !1,
|
|
792
792
|
highlight: !1
|
|
793
793
|
},
|
|
794
|
-
classNames:
|
|
794
|
+
classNames: y = {},
|
|
795
795
|
styles: w = {},
|
|
796
796
|
handleGetHtml: R = () => {
|
|
797
797
|
},
|
|
@@ -804,19 +804,19 @@ const Yt = ({
|
|
|
804
804
|
}
|
|
805
805
|
}) => {
|
|
806
806
|
var ve, ye, Ee, we, Ce, be, Re, xe;
|
|
807
|
-
const A =
|
|
807
|
+
const A = U(null), [P, T] = k(E != null && E.length ? E : " "), [q, B] = k(""), [I, _] = k(!1), [V, Y] = k({
|
|
808
808
|
x: 0,
|
|
809
809
|
y: 0
|
|
810
|
-
}), [ee, z] = k([]), D =
|
|
810
|
+
}), [ee, z] = k([]), D = U(null), $ = U(null), [H, h] = k({
|
|
811
811
|
visible: !1,
|
|
812
812
|
x: 0,
|
|
813
813
|
y: 0
|
|
814
|
-
}), [C, j] = k(!1), Z =
|
|
814
|
+
}), [C, j] = k(!1), Z = U(null), [Oe, se] = k({
|
|
815
815
|
url: "",
|
|
816
816
|
text: "",
|
|
817
817
|
title: "",
|
|
818
818
|
target: "_self"
|
|
819
|
-
}),
|
|
819
|
+
}), He = {
|
|
820
820
|
bold: !0,
|
|
821
821
|
italic: !0,
|
|
822
822
|
underline: !0,
|
|
@@ -832,23 +832,25 @@ const Yt = ({
|
|
|
832
832
|
fontFamily: (be = m.fontFamily) != null ? be : !1,
|
|
833
833
|
fontSize: (Re = m.fontSize) != null ? Re : !1,
|
|
834
834
|
highlight: (xe = m.fontSize) != null ? xe : !1
|
|
835
|
-
}, [_e, te] = k(""), [de, ne] = k([]),
|
|
835
|
+
}, [_e, te] = k(""), [de, ne] = k([]), O = () => A.current, S = () => {
|
|
836
836
|
const e = je(), t = /^<div[^>]*style=["'][^"']*font-size\s*:\s*\d+px[^"']*["'][^>]*>/.test(e.trim());
|
|
837
837
|
let n = e;
|
|
838
|
-
t || (n = `<div style="font-size:12px">${e}</div>`), n = n.replace(/<(ul|ol)([^>]*)>/g, (c,
|
|
839
|
-
<span data-hidden-array-start="true" style="display:none">{{#arrayData}}</span>`), n = n.replace(/<\/(ul|ol)>/g, (c,
|
|
840
|
-
const
|
|
841
|
-
M(
|
|
842
|
-
const i = $e(),
|
|
843
|
-
JSON.stringify(
|
|
838
|
+
t || (n = `<div style="font-size:12px">${e}</div>`), n = n.replace(/<(ul|ol)([^>]*)>/g, (c, p, v) => /data-hidden-array-start/.test(c) ? c : `<${p}${v}>
|
|
839
|
+
<span data-hidden-array-start="true" style="display:none">{{#arrayData}}</span>`), n = n.replace(/<\/(ul|ol)>/g, (c, p) => /data-hidden-array-end/.test(c) ? c : `<span data-hidden-array-end="true" style="display:none">{{/arrayData}}</span></${p}>`), B(n), R == null || R(n);
|
|
840
|
+
const a = at(e);
|
|
841
|
+
M(a);
|
|
842
|
+
const i = $e(), o = Ne(i);
|
|
843
|
+
JSON.stringify(o) !== JSON.stringify(de) && (ne(o), x(o));
|
|
844
844
|
}, je = () => {
|
|
845
|
-
const e =
|
|
845
|
+
const e = O();
|
|
846
846
|
if (!e) return P;
|
|
847
847
|
const t = e.cloneNode(!0);
|
|
848
|
-
t.querySelectorAll("table div").forEach((
|
|
848
|
+
t.querySelectorAll("table div").forEach((a) => a.remove()), t.querySelectorAll("table").forEach((a) => {
|
|
849
|
+
a.removeAttribute("data-has-resize-handle");
|
|
850
|
+
}), t.querySelectorAll(".rte-cell-highlight").forEach((a) => a.classList.remove("rte-cell-highlight"));
|
|
849
851
|
let n = t.innerHTML;
|
|
850
|
-
return n =
|
|
851
|
-
},
|
|
852
|
+
return n = Fe(n), n;
|
|
853
|
+
}, Fe = (e) => e.replace(/<tbody[^>]*>/g, "<tbody>{{#arrayData}}").replace(/<\/tbody>/g, "{{/arrayData}}</tbody>"), W = () => {
|
|
852
854
|
const e = window.getSelection();
|
|
853
855
|
if (!e || e.rangeCount === 0) return;
|
|
854
856
|
const t = document.getElementById("rte-editor-body");
|
|
@@ -862,24 +864,24 @@ const Yt = ({
|
|
|
862
864
|
const n = window.getSelection();
|
|
863
865
|
n && n.rangeCount > 0 && (D.current = n.getRangeAt(0)), K(), document.execCommand(e, !1, t), S();
|
|
864
866
|
};
|
|
865
|
-
|
|
866
|
-
const e =
|
|
867
|
+
F(() => {
|
|
868
|
+
const e = O();
|
|
867
869
|
if (!e || !E) return;
|
|
868
|
-
const t =
|
|
870
|
+
const t = Ie(E);
|
|
869
871
|
e.innerHTML = t, S();
|
|
870
872
|
}, []);
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
+
const Ie = (e) => e.replace(/<span[^>]*data-hidden-table-start[^>]*>.*?<\/span>/g, "").replace(/<span[^>]*data-hidden-table-end[^>]*>.*?<\/span>/g, "").replace(/{{#arrayData}}/g, "").replace(/{{\/arrayData}}/g, "");
|
|
874
|
+
F(() => () => {
|
|
873
875
|
document.removeEventListener("mousemove", null), document.removeEventListener("mouseup", null);
|
|
874
|
-
}, []),
|
|
876
|
+
}, []), F(() => {
|
|
875
877
|
L && L((e) => {
|
|
876
|
-
|
|
878
|
+
Ue(e);
|
|
877
879
|
});
|
|
878
|
-
}, []),
|
|
879
|
-
const e =
|
|
880
|
+
}, []), F(() => {
|
|
881
|
+
const e = O();
|
|
880
882
|
if (!e) return;
|
|
881
883
|
e.querySelectorAll("table").forEach((n) => {
|
|
882
|
-
n.
|
|
884
|
+
n.hasAttribute("data-has-resize-handle") || (oe(n), n.querySelectorAll("th, td").forEach((i) => X(i)));
|
|
883
885
|
});
|
|
884
886
|
}, []);
|
|
885
887
|
const me = (e) => {
|
|
@@ -887,22 +889,22 @@ const Yt = ({
|
|
|
887
889
|
e = e.parentNode;
|
|
888
890
|
return e;
|
|
889
891
|
}, ge = (e) => {
|
|
890
|
-
var
|
|
892
|
+
var p;
|
|
891
893
|
const t = window.getSelection();
|
|
892
894
|
if (!(t != null && t.rangeCount)) return;
|
|
893
|
-
const n = t.getRangeAt(0),
|
|
894
|
-
let i,
|
|
895
|
-
if (
|
|
896
|
-
let
|
|
897
|
-
|
|
895
|
+
const n = t.getRangeAt(0), a = me(n.startContainer);
|
|
896
|
+
let i, o;
|
|
897
|
+
if (a) {
|
|
898
|
+
let v = a.querySelector(e);
|
|
899
|
+
v || (v = document.createElement(e), v.style.margin = "0", v.style.paddingLeft = "20px", a.appendChild(v)), o = v, i = document.createElement("li"), i.textContent = "", o.appendChild(i);
|
|
898
900
|
} else {
|
|
899
901
|
document.execCommand(e === "ul" ? "insertUnorderedList" : "insertOrderedList");
|
|
900
|
-
const
|
|
901
|
-
if (
|
|
902
|
-
i =
|
|
902
|
+
const v = O();
|
|
903
|
+
if (o = v == null ? void 0 : v.querySelector(`${e}:last-child`), !o) return;
|
|
904
|
+
i = o.querySelector("li:last-child");
|
|
903
905
|
}
|
|
904
906
|
const c = document.createRange();
|
|
905
|
-
c.setStart(i, 0), c.collapse(!0), t.removeAllRanges(), t.addRange(c), (
|
|
907
|
+
c.setStart(i, 0), c.collapse(!0), t.removeAllRanges(), t.addRange(c), (p = O()) == null || p.focus(), S();
|
|
906
908
|
}, re = (e, t) => {
|
|
907
909
|
e === "insertOrderedList" ? ge("ol") : e === "insertUnorderedList" ? ge("ul") : e.startsWith("justify") ? lt(e) : ue(e, t), e === "insertTable" && Ze();
|
|
908
910
|
}, Pe = (e) => {
|
|
@@ -919,117 +921,130 @@ const Yt = ({
|
|
|
919
921
|
const t = e.anchorNode;
|
|
920
922
|
let n = e.anchorOffset;
|
|
921
923
|
if (!t) return null;
|
|
922
|
-
let
|
|
923
|
-
for (
|
|
924
|
-
if (
|
|
925
|
-
const i =
|
|
924
|
+
let a = t;
|
|
925
|
+
for (a.nodeType !== Node.TEXT_NODE && (a.childNodes && a.childNodes[n] ? a = a.childNodes[n] : a = t.previousSibling); a; ) {
|
|
926
|
+
if (a.nodeType === Node.TEXT_NODE) {
|
|
927
|
+
const i = a.textContent || "", o = a === t ? n : i.length, c = i.lastIndexOf("@", o - 1);
|
|
926
928
|
if (c !== -1) {
|
|
927
|
-
const
|
|
928
|
-
return
|
|
929
|
+
const p = document.createRange();
|
|
930
|
+
return p.setStart(a, c), p.setEnd(a, o), p;
|
|
929
931
|
}
|
|
930
932
|
}
|
|
931
|
-
|
|
933
|
+
a = a.previousSibling;
|
|
932
934
|
}
|
|
933
935
|
return null;
|
|
934
936
|
}, Be = (e) => {
|
|
935
|
-
var
|
|
937
|
+
var o;
|
|
936
938
|
const t = window.getSelection();
|
|
937
939
|
if (!t) return;
|
|
938
940
|
const n = qe();
|
|
939
941
|
n ? (t.removeAllRanges(), t.addRange(n)) : $.current && (t.removeAllRanges(), t.addRange($.current));
|
|
940
|
-
const
|
|
941
|
-
|
|
942
|
+
const a = document.createElement("span");
|
|
943
|
+
a.textContent = `{{${e.name}}}`, a.style.display = "inline", a.setAttribute("data-mention", e.value || e.name || "");
|
|
942
944
|
try {
|
|
943
945
|
const c = t.rangeCount ? t.getRangeAt(0) : null;
|
|
944
946
|
if (c)
|
|
945
|
-
c.deleteContents(), c.insertNode(
|
|
947
|
+
c.deleteContents(), c.insertNode(a);
|
|
946
948
|
else {
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
+
const g = document.createRange(), u = O();
|
|
950
|
+
g.selectNodeContents(u), g.collapse(!1), g.insertNode(a);
|
|
949
951
|
}
|
|
950
|
-
const
|
|
951
|
-
|
|
952
|
-
const
|
|
953
|
-
|
|
952
|
+
const p = document.createTextNode(" ");
|
|
953
|
+
a.after(p);
|
|
954
|
+
const v = document.createRange();
|
|
955
|
+
v.setStartAfter(p), v.collapse(!0), t.removeAllRanges(), t.addRange(v);
|
|
954
956
|
} catch (c) {
|
|
955
957
|
console.error("insertMention error:", c);
|
|
956
958
|
}
|
|
957
959
|
let i = Ne([...de, e]);
|
|
958
|
-
ne(i), x(i), _(!1), (
|
|
959
|
-
},
|
|
960
|
-
const t =
|
|
960
|
+
ne(i), x(i), _(!1), (o = O()) == null || o.focus(), S();
|
|
961
|
+
}, Ve = (e) => {
|
|
962
|
+
const t = O();
|
|
961
963
|
if (!t) return;
|
|
962
964
|
let n = null;
|
|
963
965
|
D.current && t.contains(D.current.startContainer) ? n = D.current.cloneRange() : (n = document.createRange(), n.selectNodeContents(t), n.collapse(!1));
|
|
964
|
-
const
|
|
965
|
-
if (!
|
|
966
|
-
|
|
966
|
+
const a = window.getSelection();
|
|
967
|
+
if (!a) return;
|
|
968
|
+
a.removeAllRanges(), a.addRange(n);
|
|
967
969
|
const i = document.createElement("span");
|
|
968
970
|
i.textContent = `{{${e.name}}}`, i.style.display = "inline", i.setAttribute("data-mention", e.value || e.name), n.insertNode(i);
|
|
969
|
-
const
|
|
970
|
-
i.after(
|
|
971
|
+
const o = document.createTextNode(" ");
|
|
972
|
+
i.after(o);
|
|
971
973
|
const c = document.createRange();
|
|
972
|
-
c.setStartAfter(
|
|
973
|
-
},
|
|
974
|
-
e.forEach((t) =>
|
|
975
|
-
const n = [...t, ...e],
|
|
976
|
-
return x(
|
|
974
|
+
c.setStartAfter(o), c.collapse(!0), a.removeAllRanges(), a.addRange(c), D.current = c.cloneRange(), t.focus();
|
|
975
|
+
}, Ue = (e) => {
|
|
976
|
+
e.forEach((t) => Ve(t)), ne((t) => {
|
|
977
|
+
const n = [...t, ...e], a = Array.from(new Map(n.map((i) => [i.name, i])).values());
|
|
978
|
+
return x(a), a;
|
|
977
979
|
}), S();
|
|
978
980
|
}, $e = () => {
|
|
979
|
-
const e =
|
|
981
|
+
const e = O();
|
|
980
982
|
if (!e) return [];
|
|
981
983
|
const t = e.querySelectorAll("span[data-mention]"), n = [];
|
|
982
|
-
return t.forEach((
|
|
983
|
-
const i =
|
|
984
|
+
return t.forEach((a) => {
|
|
985
|
+
const i = a.getAttribute("data-mention") || "", c = (a.textContent || "").match(/{{(.+?)}}/);
|
|
984
986
|
c && n.push({
|
|
985
987
|
name: c[1],
|
|
986
988
|
value: i
|
|
987
989
|
});
|
|
988
990
|
}), n;
|
|
989
991
|
}, We = (e) => {
|
|
990
|
-
var n,
|
|
992
|
+
var n, a, i;
|
|
991
993
|
const t = e.key.toLowerCase();
|
|
992
994
|
if ((e.ctrlKey || e.metaKey) && ["b", "i", "u"].includes(t) && (e.preventDefault(), re(t === "b" ? "bold" : t === "i" ? "italic" : t === "u" ? "underline" : "")), e.shiftKey && e.key === "2" && e.preventDefault(), e.key === "Enter") {
|
|
993
|
-
const
|
|
995
|
+
const o = window.getSelection(), c = o != null && o.anchorNode ? me(o.anchorNode) : null;
|
|
994
996
|
if (!c) return;
|
|
995
997
|
if (((n = c.textContent) == null ? void 0 : n.replace(/\u200B/g, "").trim()) === "") {
|
|
996
998
|
e.preventDefault();
|
|
997
|
-
const
|
|
998
|
-
if (
|
|
999
|
-
|
|
999
|
+
const v = c.parentElement, g = v == null ? void 0 : v.closest("li");
|
|
1000
|
+
if (g) {
|
|
1001
|
+
v == null || v.removeChild(c);
|
|
1000
1002
|
const u = document.createElement("p");
|
|
1001
|
-
u.innerHTML = "<br />", (
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1003
|
+
u.innerHTML = "<br />", (a = g.parentElement) == null || a.insertBefore(u, g.nextSibling);
|
|
1004
|
+
const f = document.createRange();
|
|
1005
|
+
f.setStart(u, 0), f.collapse(!0), o == null || o.removeAllRanges(), o == null || o.addRange(f);
|
|
1004
1006
|
} else {
|
|
1005
1007
|
const u = c.closest("ul, ol");
|
|
1006
1008
|
if (u) {
|
|
1007
|
-
const
|
|
1008
|
-
|
|
1009
|
+
const f = document.createElement("p");
|
|
1010
|
+
f.innerHTML = "<br />", (i = u.parentElement) == null || i.insertBefore(f, u.nextSibling), u.removeChild(c);
|
|
1009
1011
|
const b = document.createRange();
|
|
1010
|
-
b.setStart(
|
|
1012
|
+
b.setStart(f, 0), b.collapse(!0), o == null || o.removeAllRanges(), o == null || o.addRange(b);
|
|
1011
1013
|
}
|
|
1012
1014
|
}
|
|
1013
1015
|
S();
|
|
1014
1016
|
}
|
|
1015
1017
|
}
|
|
1018
|
+
if (t === "backspace" || t === "delete") {
|
|
1019
|
+
const o = window.getSelection();
|
|
1020
|
+
if (!o || o.rangeCount === 0) return;
|
|
1021
|
+
const c = o.getRangeAt(0);
|
|
1022
|
+
if (c.cloneContents().querySelector("table")) {
|
|
1023
|
+
console.log("Deleting full table...");
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
if (c.cloneContents().querySelectorAll(".rte-resize-handle").length > 0) {
|
|
1027
|
+
e.preventDefault(), e.stopPropagation();
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1016
1031
|
}, Ke = (e) => {
|
|
1017
1032
|
if (e.data === "@") {
|
|
1018
1033
|
const n = window.getSelection();
|
|
1019
1034
|
if (!(n != null && n.rangeCount)) return;
|
|
1020
|
-
const
|
|
1021
|
-
if (
|
|
1035
|
+
const a = n.anchorNode;
|
|
1036
|
+
if (ae(a))
|
|
1022
1037
|
return;
|
|
1023
1038
|
setTimeout(() => {
|
|
1024
1039
|
Pe(n.getRangeAt(0)), te(""), z(r), _(!0);
|
|
1025
1040
|
}, 0);
|
|
1026
1041
|
return;
|
|
1027
1042
|
}
|
|
1028
|
-
if (
|
|
1043
|
+
if (I) {
|
|
1029
1044
|
setTimeout(() => fe(), 0);
|
|
1030
1045
|
return;
|
|
1031
1046
|
}
|
|
1032
|
-
},
|
|
1047
|
+
}, ae = (e) => {
|
|
1033
1048
|
if (!e) return !1;
|
|
1034
1049
|
let t = e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement;
|
|
1035
1050
|
for (; t; ) {
|
|
@@ -1041,7 +1056,7 @@ const Yt = ({
|
|
|
1041
1056
|
S();
|
|
1042
1057
|
const e = window.getSelection();
|
|
1043
1058
|
if (!e || !e.anchorNode) return;
|
|
1044
|
-
if (
|
|
1059
|
+
if (ae(e.anchorNode)) {
|
|
1045
1060
|
_(!1);
|
|
1046
1061
|
return;
|
|
1047
1062
|
}
|
|
@@ -1052,74 +1067,74 @@ const Yt = ({
|
|
|
1052
1067
|
_(!1);
|
|
1053
1068
|
return;
|
|
1054
1069
|
}
|
|
1055
|
-
const
|
|
1056
|
-
te(
|
|
1057
|
-
const i = r.filter((
|
|
1070
|
+
const a = n[1].trim().toLowerCase();
|
|
1071
|
+
te(a);
|
|
1072
|
+
const i = r.filter((o) => o.name.toLowerCase().includes(a));
|
|
1058
1073
|
i.length > 0 ? (z(i), _(!0)) : _(!1);
|
|
1059
1074
|
}, Xe = (e) => {
|
|
1060
|
-
var
|
|
1061
|
-
const t = (
|
|
1075
|
+
var a;
|
|
1076
|
+
const t = (a = e.target.files) == null ? void 0 : a[0];
|
|
1062
1077
|
if (!t) return;
|
|
1063
1078
|
const n = new FileReader();
|
|
1064
1079
|
n.onload = (i) => {
|
|
1065
1080
|
var b;
|
|
1066
|
-
const
|
|
1081
|
+
const o = (b = i.target) == null ? void 0 : b.result;
|
|
1067
1082
|
K();
|
|
1068
1083
|
const c = window.getSelection();
|
|
1069
|
-
let
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1072
|
-
const
|
|
1073
|
-
if (!
|
|
1074
|
-
|
|
1084
|
+
let p = c && c.rangeCount ? c.getRangeAt(0) : null;
|
|
1085
|
+
const v = document.createElement("img");
|
|
1086
|
+
v.src = o, v.alt = t.name || "image", v.className = "rte-inserted-image", v.contentEditable = "true";
|
|
1087
|
+
const g = O();
|
|
1088
|
+
if (!p || !g) {
|
|
1089
|
+
g == null || g.appendChild(v);
|
|
1075
1090
|
const Le = document.createTextNode(" ");
|
|
1076
|
-
|
|
1091
|
+
g == null || g.appendChild(Le);
|
|
1077
1092
|
const le = document.createRange();
|
|
1078
|
-
le.setStartAfter(Le), le.collapse(!0), c == null || c.removeAllRanges(), c == null || c.addRange(le),
|
|
1093
|
+
le.setStartAfter(Le), le.collapse(!0), c == null || c.removeAllRanges(), c == null || c.addRange(le), g == null || g.focus(), S(), e.target.value = "";
|
|
1079
1094
|
return;
|
|
1080
1095
|
}
|
|
1081
|
-
|
|
1096
|
+
p.deleteContents(), p.insertNode(v);
|
|
1082
1097
|
const u = document.createTextNode(" ");
|
|
1083
|
-
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1098
|
+
v.after(u);
|
|
1099
|
+
const f = document.createRange();
|
|
1100
|
+
f.setStartAfter(u), f.collapse(!0), c.removeAllRanges(), c.addRange(f), g.focus(), S(), e.target.value = "";
|
|
1086
1101
|
}, n.readAsDataURL(t);
|
|
1087
1102
|
}, Ye = (e) => {
|
|
1088
1103
|
var i;
|
|
1089
1104
|
K();
|
|
1090
1105
|
const t = window.getSelection();
|
|
1091
1106
|
if (!(t != null && t.rangeCount)) return;
|
|
1092
|
-
const n = t.getRangeAt(0),
|
|
1093
|
-
n.insertNode(
|
|
1107
|
+
const n = t.getRangeAt(0), a = document.createTextNode(e);
|
|
1108
|
+
n.insertNode(a), n.setStartAfter(a), n.collapse(!0), t.removeAllRanges(), t.addRange(n), (i = O()) == null || i.focus(), S();
|
|
1094
1109
|
}, Ze = () => {
|
|
1095
|
-
var
|
|
1110
|
+
var g;
|
|
1096
1111
|
dt(), K();
|
|
1097
1112
|
const e = document.createElement("table");
|
|
1098
|
-
e.style.borderCollapse = "collapse", e.style.width = "100%", e.style.border = "1px solid #ccc", e.style.margin = "8px 0", e.style.position = "relative", e.style.textAlign = "center",
|
|
1113
|
+
e.style.borderCollapse = "collapse", e.style.width = "100%", e.style.border = "1px solid #ccc", e.style.margin = "8px 0", e.style.position = "relative", e.style.textAlign = "center", y.table && e.classList.add(y.table);
|
|
1099
1114
|
const t = document.createElement("thead");
|
|
1100
|
-
|
|
1115
|
+
y.thead && t.classList.add(y.thead);
|
|
1101
1116
|
const n = document.createElement("tbody");
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1117
|
+
y.tbody && n.classList.add(y.tbody);
|
|
1118
|
+
const a = document.createElement("tr");
|
|
1119
|
+
y.tr && a.classList.add(y.tr);
|
|
1105
1120
|
const i = document.createElement("tr");
|
|
1106
|
-
|
|
1121
|
+
y.tr && i.classList.add(y.tr);
|
|
1107
1122
|
for (let u = 0; u < 2; u++) {
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1123
|
+
const f = document.createElement("th");
|
|
1124
|
+
f.textContent = "", f.style.border = "1px solid #999", f.style.padding = "4px", f.style.position = "relative", f.style.backgroundColor = "lightgray", f.style.height = "20px", y.th && f.classList.add(y.th);
|
|
1110
1125
|
const b = document.createElement("td");
|
|
1111
|
-
b.textContent = "", b.style.border = "1px solid #999", b.style.padding = "4px", b.style.position = "relative", b.style.backgroundColor = "#fff", b.style.height = "20px",
|
|
1126
|
+
b.textContent = "", b.style.border = "1px solid #999", b.style.padding = "4px", b.style.position = "relative", b.style.backgroundColor = "#fff", b.style.height = "20px", y.td && b.classList.add(y.td), X(f), X(b), a.appendChild(f), i.appendChild(b);
|
|
1112
1127
|
}
|
|
1113
|
-
t.appendChild(
|
|
1114
|
-
const
|
|
1115
|
-
if (!(
|
|
1116
|
-
const c =
|
|
1128
|
+
t.appendChild(a), n.appendChild(i), e.appendChild(t), e.appendChild(n), oe(e);
|
|
1129
|
+
const o = window.getSelection();
|
|
1130
|
+
if (!(o != null && o.rangeCount)) return;
|
|
1131
|
+
const c = o.getRangeAt(0);
|
|
1117
1132
|
c.collapse(!1), c.insertNode(e);
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1122
|
-
},
|
|
1133
|
+
const p = document.createElement("p");
|
|
1134
|
+
p.innerHTML = "<br/>", e.after(p);
|
|
1135
|
+
const v = document.createRange();
|
|
1136
|
+
v.setStart(p, 0), v.collapse(!0), o.removeAllRanges(), o.addRange(v), (g = O()) == null || g.focus(), S();
|
|
1137
|
+
}, oe = (e) => {
|
|
1123
1138
|
if (e.dataset.hasResizeHandle === "true") return;
|
|
1124
1139
|
const t = document.createElement("div");
|
|
1125
1140
|
Object.assign(t.style, {
|
|
@@ -1132,19 +1147,19 @@ const Yt = ({
|
|
|
1132
1147
|
cursor: "nwse-resize",
|
|
1133
1148
|
zIndex: "20",
|
|
1134
1149
|
borderRadius: "2px"
|
|
1135
|
-
}), t.
|
|
1136
|
-
let n = 0,
|
|
1150
|
+
}), t.contentEditable = "false", t.dataset.hasResizeHandle = "true", t.classList.add("rte-resize-handle");
|
|
1151
|
+
let n = 0, a = 0, i = 0, o = 0;
|
|
1137
1152
|
t.addEventListener("mousedown", (c) => {
|
|
1138
|
-
c.preventDefault(), n = c.clientX,
|
|
1139
|
-
const
|
|
1140
|
-
i =
|
|
1141
|
-
const
|
|
1142
|
-
const
|
|
1143
|
-
e.style.width = `${
|
|
1144
|
-
},
|
|
1145
|
-
document.removeEventListener("mousemove",
|
|
1153
|
+
c.preventDefault(), n = c.clientX, a = c.clientY;
|
|
1154
|
+
const p = e.getBoundingClientRect();
|
|
1155
|
+
i = p.width, o = p.height;
|
|
1156
|
+
const v = (u) => {
|
|
1157
|
+
const f = Math.max(100, i + (u.clientX - n)), b = Math.max(20, o + (u.clientY - a));
|
|
1158
|
+
e.style.width = `${f}px`, e.style.height = `${b}px`, S();
|
|
1159
|
+
}, g = () => {
|
|
1160
|
+
document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", g), S();
|
|
1146
1161
|
};
|
|
1147
|
-
document.addEventListener("mousemove",
|
|
1162
|
+
document.addEventListener("mousemove", v), document.addEventListener("mouseup", g);
|
|
1148
1163
|
}), e.appendChild(t);
|
|
1149
1164
|
}, X = (e) => {
|
|
1150
1165
|
const t = document.createElement("div"), n = document.createElement("div");
|
|
@@ -1157,12 +1172,10 @@ const Yt = ({
|
|
|
1157
1172
|
cursor: "col-resize",
|
|
1158
1173
|
background: "rgba(0,0,0,0.15)",
|
|
1159
1174
|
zIndex: "10",
|
|
1160
|
-
userSelect: "none",
|
|
1161
|
-
WebkitUserSelect: "none",
|
|
1162
1175
|
MozUserSelect: "none",
|
|
1163
1176
|
msUserSelect: "none",
|
|
1164
1177
|
pointerEvents: "auto"
|
|
1165
|
-
}), t.contentEditable = "false", Object.assign(n.style, {
|
|
1178
|
+
}), t.contentEditable = "false", t.classList.add("rte-resize-handle"), Object.assign(n.style, {
|
|
1166
1179
|
position: "absolute",
|
|
1167
1180
|
bottom: "0",
|
|
1168
1181
|
left: "0",
|
|
@@ -1171,31 +1184,29 @@ const Yt = ({
|
|
|
1171
1184
|
cursor: "row-resize",
|
|
1172
1185
|
background: "rgba(0,0,0,0.15)",
|
|
1173
1186
|
zIndex: "10",
|
|
1174
|
-
userSelect: "none",
|
|
1175
|
-
WebkitUserSelect: "none",
|
|
1176
1187
|
MozUserSelect: "none",
|
|
1177
1188
|
msUserSelect: "none",
|
|
1178
1189
|
pointerEvents: "auto"
|
|
1179
|
-
}), n.contentEditable = "false", Qe(e, t, n), e.appendChild(t), e.appendChild(n);
|
|
1190
|
+
}), n.contentEditable = "false", n.classList.add("rte-resize-handle"), Qe(e, t, n), e.appendChild(t), e.appendChild(n);
|
|
1180
1191
|
}, Qe = (e, t, n) => {
|
|
1181
|
-
let
|
|
1192
|
+
let a = 0, i = 0, o = 0, c = 0;
|
|
1182
1193
|
t.addEventListener("mousedown", (u) => {
|
|
1183
|
-
u.preventDefault(),
|
|
1194
|
+
u.preventDefault(), a = u.clientX, o = e.offsetWidth, document.addEventListener("mousemove", p), document.addEventListener("mouseup", g);
|
|
1184
1195
|
}), n.addEventListener("mousedown", (u) => {
|
|
1185
|
-
u.preventDefault(), i = u.clientY, c = e.offsetHeight, document.addEventListener("mousemove",
|
|
1196
|
+
u.preventDefault(), i = u.clientY, c = e.offsetHeight, document.addEventListener("mousemove", v), document.addEventListener("mouseup", g);
|
|
1186
1197
|
});
|
|
1187
|
-
const
|
|
1188
|
-
const
|
|
1189
|
-
e.style.width = `${Math.max(30,
|
|
1190
|
-
},
|
|
1191
|
-
const
|
|
1192
|
-
e.style.height = `${Math.max(20,
|
|
1193
|
-
},
|
|
1194
|
-
document.removeEventListener("mousemove",
|
|
1198
|
+
const p = (u) => {
|
|
1199
|
+
const f = o + (u.clientX - a);
|
|
1200
|
+
e.style.width = `${Math.max(30, f)}px`, S();
|
|
1201
|
+
}, v = (u) => {
|
|
1202
|
+
const f = c + (u.clientY - i);
|
|
1203
|
+
e.style.height = `${Math.max(20, f)}px`, S();
|
|
1204
|
+
}, g = () => {
|
|
1205
|
+
document.removeEventListener("mousemove", p), document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", g), S();
|
|
1195
1206
|
};
|
|
1196
1207
|
}, Je = (e) => {
|
|
1197
1208
|
const n = e.target.closest("td, th");
|
|
1198
|
-
n && (e.preventDefault(), document.querySelectorAll(".rte-cell-highlight").forEach((
|
|
1209
|
+
n && (e.preventDefault(), document.querySelectorAll(".rte-cell-highlight").forEach((a) => a.classList.remove("rte-cell-highlight")), n.classList.add("rte-cell-highlight"), h({
|
|
1199
1210
|
visible: !0,
|
|
1200
1211
|
x: e.clientX,
|
|
1201
1212
|
y: e.clientY,
|
|
@@ -1204,50 +1215,50 @@ const Yt = ({
|
|
|
1204
1215
|
}, he = () => {
|
|
1205
1216
|
document.querySelectorAll(".rte-cell-highlight").forEach((e) => e.classList.remove("rte-cell-highlight"));
|
|
1206
1217
|
}, Ge = (e) => {
|
|
1207
|
-
if (!
|
|
1208
|
-
const t =
|
|
1209
|
-
const c =
|
|
1210
|
-
return
|
|
1218
|
+
if (!H.cell) return;
|
|
1219
|
+
const t = H.cell.closest("table"), n = H.cell.cellIndex, a = H.cell.parentElement.rowIndex, i = (o) => {
|
|
1220
|
+
const c = o.tagName.toLowerCase(), p = document.createElement(c);
|
|
1221
|
+
return p.textContent = "", p.style.cssText = o.style.cssText, X(p), p;
|
|
1211
1222
|
};
|
|
1212
1223
|
switch (e) {
|
|
1213
1224
|
case "insertRowAbove": {
|
|
1214
|
-
const
|
|
1215
|
-
Array.from(
|
|
1216
|
-
c.appendChild(i(
|
|
1225
|
+
const o = t.rows[a], c = t.insertRow(a);
|
|
1226
|
+
Array.from(o.cells).forEach((p) => {
|
|
1227
|
+
c.appendChild(i(p));
|
|
1217
1228
|
});
|
|
1218
1229
|
break;
|
|
1219
1230
|
}
|
|
1220
1231
|
case "insertRowBelow": {
|
|
1221
|
-
const
|
|
1222
|
-
Array.from(
|
|
1223
|
-
c.appendChild(i(
|
|
1232
|
+
const o = t.rows[a], c = t.insertRow(a + 1);
|
|
1233
|
+
Array.from(o.cells).forEach((p) => {
|
|
1234
|
+
c.appendChild(i(p));
|
|
1224
1235
|
});
|
|
1225
1236
|
break;
|
|
1226
1237
|
}
|
|
1227
1238
|
case "insertColLeft": {
|
|
1228
|
-
Array.from(t.rows).forEach((
|
|
1229
|
-
const c =
|
|
1230
|
-
|
|
1239
|
+
Array.from(t.rows).forEach((o) => {
|
|
1240
|
+
const c = o.cells[n];
|
|
1241
|
+
o.insertBefore(i(c), c);
|
|
1231
1242
|
});
|
|
1232
1243
|
break;
|
|
1233
1244
|
}
|
|
1234
1245
|
case "insertColRight": {
|
|
1235
|
-
Array.from(t.rows).forEach((
|
|
1236
|
-
const c =
|
|
1237
|
-
|
|
1246
|
+
Array.from(t.rows).forEach((o) => {
|
|
1247
|
+
const c = o.cells[n];
|
|
1248
|
+
o.insertBefore(i(c), c.nextSibling);
|
|
1238
1249
|
});
|
|
1239
1250
|
break;
|
|
1240
1251
|
}
|
|
1241
1252
|
case "deleteRow":
|
|
1242
|
-
t.rows.length > 1 && t.deleteRow(
|
|
1253
|
+
t.rows.length > 1 && t.deleteRow(a);
|
|
1243
1254
|
break;
|
|
1244
1255
|
case "deleteCol":
|
|
1245
|
-
Array.from(t.rows).forEach((
|
|
1246
|
-
|
|
1256
|
+
Array.from(t.rows).forEach((o) => {
|
|
1257
|
+
o.cells[n] && o.deleteCell(n);
|
|
1247
1258
|
});
|
|
1248
1259
|
break;
|
|
1249
1260
|
}
|
|
1250
|
-
S(), h(ie(ce({},
|
|
1261
|
+
S(), h(ie(ce({}, H), {
|
|
1251
1262
|
visible: !1
|
|
1252
1263
|
})), he();
|
|
1253
1264
|
}, et = () => {
|
|
@@ -1263,14 +1274,14 @@ const Yt = ({
|
|
|
1263
1274
|
t.removeAllRanges(), t.addRange(Z.current);
|
|
1264
1275
|
let n = e.url.trim();
|
|
1265
1276
|
/^https?:\/\//i.test(n) || (n = "https://" + n);
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1277
|
+
const a = document.createElement("a");
|
|
1278
|
+
a.href = n, a.style.cursor = "pointer", a.style.outline = "none", a.textContent = e.text || n, a.title = e.title, a.target = e.target, a.contentEditable = "true";
|
|
1268
1279
|
const i = t.getRangeAt(0);
|
|
1269
|
-
i.deleteContents(), i.insertNode(
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1280
|
+
i.deleteContents(), i.insertNode(a);
|
|
1281
|
+
const o = document.createTextNode(" ");
|
|
1282
|
+
a.after(o);
|
|
1272
1283
|
const c = document.createRange();
|
|
1273
|
-
c.setStartAfter(
|
|
1284
|
+
c.setStartAfter(o), c.collapse(!0), t.removeAllRanges(), t.addRange(c), j(!1), S();
|
|
1274
1285
|
}, nt = (e) => {
|
|
1275
1286
|
const t = e.target;
|
|
1276
1287
|
if (t.tagName === "A") {
|
|
@@ -1280,8 +1291,8 @@ const Yt = ({
|
|
|
1280
1291
|
return;
|
|
1281
1292
|
}
|
|
1282
1293
|
e.preventDefault();
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1294
|
+
const a = document.createRange();
|
|
1295
|
+
a.selectNode(n), Z.current = a, se({
|
|
1285
1296
|
url: n.href,
|
|
1286
1297
|
text: n.textContent || n.href,
|
|
1287
1298
|
title: n.title,
|
|
@@ -1289,7 +1300,7 @@ const Yt = ({
|
|
|
1289
1300
|
}), j(!0);
|
|
1290
1301
|
}
|
|
1291
1302
|
}, rt = () => {
|
|
1292
|
-
const e =
|
|
1303
|
+
const e = O();
|
|
1293
1304
|
if (!e) return;
|
|
1294
1305
|
const t = window.getSelection();
|
|
1295
1306
|
if ((!t || t.rangeCount === 0) && D.current) {
|
|
@@ -1298,30 +1309,30 @@ const Yt = ({
|
|
|
1298
1309
|
}
|
|
1299
1310
|
const n = window.getSelection();
|
|
1300
1311
|
if (!n || n.rangeCount === 0) return;
|
|
1301
|
-
const
|
|
1312
|
+
const a = n.getRangeAt(0);
|
|
1302
1313
|
K(), document.execCommand("removeFormat", !1);
|
|
1303
|
-
const i =
|
|
1304
|
-
|
|
1305
|
-
const c = document.createTreeWalker(
|
|
1314
|
+
const i = a.cloneContents(), o = document.createElement("div");
|
|
1315
|
+
o.appendChild(i);
|
|
1316
|
+
const c = document.createTreeWalker(o, NodeFilter.SHOW_ELEMENT, null), p = [];
|
|
1306
1317
|
for (; c.nextNode(); ) {
|
|
1307
|
-
const u = c.currentNode,
|
|
1308
|
-
|
|
1318
|
+
const u = c.currentNode, f = u.tagName.toUpperCase(), b = u.getAttribute && u.getAttribute("data-mention") !== null;
|
|
1319
|
+
f !== "A" && !b && p.push(u);
|
|
1309
1320
|
}
|
|
1310
|
-
for (let u =
|
|
1311
|
-
const
|
|
1321
|
+
for (let u = p.length - 1; u >= 0; u--) {
|
|
1322
|
+
const f = p[u], b = f.parentNode;
|
|
1312
1323
|
if (b) {
|
|
1313
|
-
for (;
|
|
1314
|
-
b.removeChild(
|
|
1324
|
+
for (; f.firstChild; ) b.insertBefore(f.firstChild, f);
|
|
1325
|
+
b.removeChild(f);
|
|
1315
1326
|
}
|
|
1316
1327
|
}
|
|
1317
|
-
|
|
1318
|
-
const
|
|
1319
|
-
for (;
|
|
1320
|
-
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1323
|
-
},
|
|
1324
|
-
var
|
|
1328
|
+
o.querySelectorAll("[style]").forEach((u) => u.removeAttribute("style")), a.deleteContents();
|
|
1329
|
+
const v = document.createDocumentFragment();
|
|
1330
|
+
for (; o.firstChild; ) v.appendChild(o.firstChild);
|
|
1331
|
+
a.insertNode(v);
|
|
1332
|
+
const g = document.createRange();
|
|
1333
|
+
g.setStartAfter(a.endContainer.nodeType === Node.TEXT_NODE ? a.endContainer : a.startContainer), g.collapse(!0), n.removeAllRanges(), n.addRange(g), e.normalize(), S();
|
|
1334
|
+
}, at = (e) => {
|
|
1335
|
+
var a;
|
|
1325
1336
|
let t = e;
|
|
1326
1337
|
t = t.replace(/{{#arrayData\d*}}/g, ""), t = t.replace(/{{\/arrayData\d*}}/g, "");
|
|
1327
1338
|
const n = document.createElement("div");
|
|
@@ -1334,73 +1345,73 @@ const Yt = ({
|
|
|
1334
1345
|
}), n.querySelectorAll("table").forEach((i) => {
|
|
1335
1346
|
i.insertAdjacentText("afterend", `
|
|
1336
1347
|
`);
|
|
1337
|
-
}), ((
|
|
1348
|
+
}), ((a = n.textContent) == null ? void 0 : a.replace(/\n{3,}/g, `
|
|
1338
1349
|
|
|
1339
1350
|
`).trim()) || "";
|
|
1340
1351
|
};
|
|
1341
|
-
function
|
|
1352
|
+
function ot() {
|
|
1342
1353
|
const e = window.getSelection();
|
|
1343
1354
|
if (!e || e.rangeCount === 0) return [];
|
|
1344
1355
|
const t = e.getRangeAt(0);
|
|
1345
1356
|
if (t.collapsed) {
|
|
1346
|
-
let
|
|
1347
|
-
const
|
|
1348
|
-
return
|
|
1357
|
+
let o = t.startContainer, c = o.nodeType === Node.ELEMENT_NODE ? o : o.parentElement;
|
|
1358
|
+
const p = c == null ? void 0 : c.closest("td, th");
|
|
1359
|
+
return p ? [p] : [];
|
|
1349
1360
|
}
|
|
1350
|
-
const n = t.commonAncestorContainer,
|
|
1351
|
-
return Array.from(
|
|
1361
|
+
const n = t.commonAncestorContainer, a = n.nodeType === Node.ELEMENT_NODE ? n : n.parentElement;
|
|
1362
|
+
return Array.from(a.querySelectorAll("td, th")).filter((o) => {
|
|
1352
1363
|
const c = document.createRange();
|
|
1353
|
-
return c.selectNodeContents(
|
|
1364
|
+
return c.selectNodeContents(o), t.compareBoundaryPoints(Range.END_TO_START, c) < 0 && t.compareBoundaryPoints(Range.START_TO_END, c) > 0;
|
|
1354
1365
|
});
|
|
1355
1366
|
}
|
|
1356
1367
|
function lt(e) {
|
|
1357
|
-
const t =
|
|
1368
|
+
const t = ot();
|
|
1358
1369
|
if (t.length === 0) {
|
|
1359
1370
|
ue(e);
|
|
1360
1371
|
return;
|
|
1361
1372
|
}
|
|
1362
1373
|
let n = "left";
|
|
1363
|
-
e === "justifyCenter" && (n = "center"), e === "justifyRight" && (n = "right"), t.forEach((
|
|
1364
|
-
|
|
1374
|
+
e === "justifyCenter" && (n = "center"), e === "justifyRight" && (n = "right"), t.forEach((a) => {
|
|
1375
|
+
a.style.textAlign = n;
|
|
1365
1376
|
}), S();
|
|
1366
1377
|
}
|
|
1367
1378
|
const ct = (e) => {
|
|
1368
1379
|
e.preventDefault();
|
|
1369
1380
|
const t = e.clipboardData.items;
|
|
1370
|
-
for (let
|
|
1371
|
-
const u = t[
|
|
1381
|
+
for (let g = 0; g < t.length; g++) {
|
|
1382
|
+
const u = t[g];
|
|
1372
1383
|
if (u.kind === "file" && u.type.startsWith("image/"))
|
|
1373
1384
|
return;
|
|
1374
|
-
u.kind === "string" && u.getAsString((
|
|
1375
|
-
/<img\s/i.test(
|
|
1385
|
+
u.kind === "string" && u.getAsString((f) => {
|
|
1386
|
+
/<img\s/i.test(f);
|
|
1376
1387
|
});
|
|
1377
1388
|
}
|
|
1378
1389
|
const n = e.clipboardData.getData("text/html") || "";
|
|
1379
1390
|
if (!n) return;
|
|
1380
|
-
const
|
|
1381
|
-
|
|
1382
|
-
const i = (
|
|
1383
|
-
|
|
1384
|
-
const
|
|
1385
|
-
|
|
1386
|
-
}),
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1391
|
+
const a = document.createElement("div");
|
|
1392
|
+
a.innerHTML = n;
|
|
1393
|
+
const i = (g) => {
|
|
1394
|
+
g.style.borderCollapse = "collapse", g.style.width = "100%", g.style.border = "1px solid #ccc", g.style.margin = "8px 0", g.style.position = "relative", g.style.textAlign = "center", g.querySelectorAll("th").forEach((u) => {
|
|
1395
|
+
const f = u;
|
|
1396
|
+
f.style.border = "1px solid #999", f.style.padding = "4px", f.style.position = "relative", f.style.backgroundColor = "lightgray", f.style.height = "20px";
|
|
1397
|
+
}), g.querySelectorAll("td").forEach((u) => {
|
|
1398
|
+
const f = u;
|
|
1399
|
+
f.style.border = "1px solid #999", f.style.padding = "4px", f.style.position = "relative", f.style.backgroundColor = "#fff", f.style.height = "20px";
|
|
1389
1400
|
});
|
|
1390
1401
|
};
|
|
1391
|
-
|
|
1392
|
-
const
|
|
1393
|
-
if (!
|
|
1394
|
-
const c =
|
|
1402
|
+
a.querySelectorAll("table").forEach((g) => i(g));
|
|
1403
|
+
const o = window.getSelection();
|
|
1404
|
+
if (!o || !o.rangeCount) return;
|
|
1405
|
+
const c = o.getRangeAt(0);
|
|
1395
1406
|
c.deleteContents();
|
|
1396
|
-
const
|
|
1397
|
-
for (;
|
|
1398
|
-
c.insertNode(
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
const u =
|
|
1402
|
-
u.
|
|
1403
|
-
const b =
|
|
1407
|
+
const p = document.createDocumentFragment();
|
|
1408
|
+
for (; a.firstChild; ) p.appendChild(a.firstChild);
|
|
1409
|
+
c.insertNode(p), c.collapse(!1), o.removeAllRanges(), o.addRange(c);
|
|
1410
|
+
const v = A.current;
|
|
1411
|
+
v && (v.querySelectorAll("table").forEach((g) => {
|
|
1412
|
+
const u = g;
|
|
1413
|
+
u.hasAttribute("data-has-resize-handle") || (oe(u), u.querySelectorAll("th, td").forEach((f) => {
|
|
1414
|
+
const b = f;
|
|
1404
1415
|
b.dataset.hasResizeHandles || X(b);
|
|
1405
1416
|
}));
|
|
1406
1417
|
}), S());
|
|
@@ -1408,23 +1419,23 @@ const Yt = ({
|
|
|
1408
1419
|
K();
|
|
1409
1420
|
const t = window.getSelection();
|
|
1410
1421
|
if (!t || !t.rangeCount) return;
|
|
1411
|
-
const n = t.getRangeAt(0),
|
|
1412
|
-
|
|
1422
|
+
const n = t.getRangeAt(0), a = document.createElement("span");
|
|
1423
|
+
a.style.fontSize = `${e}px`, a.appendChild(n.extractContents()), n.insertNode(a);
|
|
1413
1424
|
const i = document.createRange();
|
|
1414
|
-
i.setStartAfter(
|
|
1425
|
+
i.setStartAfter(a), i.collapse(!0), t.removeAllRanges(), t.addRange(i), S();
|
|
1415
1426
|
}, st = () => {
|
|
1416
1427
|
const e = window.getSelection();
|
|
1417
1428
|
if (!e || !e.anchorNode) return null;
|
|
1418
1429
|
const t = e.anchorNode;
|
|
1419
|
-
if (
|
|
1420
|
-
const n = t.textContent || "",
|
|
1430
|
+
if (ae(t) || t.nodeType !== Node.TEXT_NODE) return null;
|
|
1431
|
+
const n = t.textContent || "", a = e.anchorOffset, i = n.lastIndexOf("@", a - 1);
|
|
1421
1432
|
if (i === -1) return null;
|
|
1422
|
-
const
|
|
1423
|
-
if (
|
|
1433
|
+
const o = n.substring(i + 1, a);
|
|
1434
|
+
if (o.includes(" ") || o.includes(" ")) return null;
|
|
1424
1435
|
const c = document.createRange();
|
|
1425
|
-
return c.setStart(t, i), c.setEnd(t,
|
|
1436
|
+
return c.setStart(t, i), c.setEnd(t, a), {
|
|
1426
1437
|
range: c,
|
|
1427
|
-
query:
|
|
1438
|
+
query: o
|
|
1428
1439
|
};
|
|
1429
1440
|
}, pe = () => {
|
|
1430
1441
|
const e = st();
|
|
@@ -1432,15 +1443,15 @@ const Yt = ({
|
|
|
1432
1443
|
const {
|
|
1433
1444
|
range: t,
|
|
1434
1445
|
query: n
|
|
1435
|
-
} = e,
|
|
1436
|
-
|
|
1437
|
-
const i =
|
|
1438
|
-
|
|
1446
|
+
} = e, a = document.createElement("span");
|
|
1447
|
+
a.textContent = "", t.insertNode(a);
|
|
1448
|
+
const i = a.getBoundingClientRect();
|
|
1449
|
+
a.remove(), Y({
|
|
1439
1450
|
x: i.left,
|
|
1440
1451
|
y: i.bottom + window.scrollY
|
|
1441
1452
|
}), te(n.toLowerCase());
|
|
1442
|
-
const
|
|
1443
|
-
z(
|
|
1453
|
+
const o = r.filter((c) => c.name.toLowerCase().includes(n.toLowerCase()));
|
|
1454
|
+
z(o), _(!0), $.current = t.cloneRange();
|
|
1444
1455
|
};
|
|
1445
1456
|
function dt() {
|
|
1446
1457
|
const e = A.current;
|
|
@@ -1451,14 +1462,14 @@ const Yt = ({
|
|
|
1451
1462
|
const n = document.createRange();
|
|
1452
1463
|
n.selectNodeContents(e), n.collapse(!1), t.removeAllRanges(), t.addRange(n), D.current = n.cloneRange();
|
|
1453
1464
|
}
|
|
1454
|
-
return /* @__PURE__ */
|
|
1455
|
-
className: `rte-wrapper ${(
|
|
1465
|
+
return /* @__PURE__ */ l.createElement("div", {
|
|
1466
|
+
className: `rte-wrapper ${(y == null ? void 0 : y.wrapper) || ""}`,
|
|
1456
1467
|
style: w.wrapper
|
|
1457
|
-
}, /* @__PURE__ */
|
|
1468
|
+
}, /* @__PURE__ */ l.createElement("div", {
|
|
1458
1469
|
style: {
|
|
1459
1470
|
flex: 1
|
|
1460
1471
|
}
|
|
1461
|
-
}, /* @__PURE__ */
|
|
1472
|
+
}, /* @__PURE__ */ l.createElement(qt, {
|
|
1462
1473
|
exec: re,
|
|
1463
1474
|
saveSelection: W,
|
|
1464
1475
|
handleFileChange: Xe,
|
|
@@ -1467,13 +1478,13 @@ const Yt = ({
|
|
|
1467
1478
|
insertEmoji: Ye,
|
|
1468
1479
|
handleLink: et,
|
|
1469
1480
|
removeFormatting: rt,
|
|
1470
|
-
visibleActions:
|
|
1471
|
-
className:
|
|
1481
|
+
visibleActions: He,
|
|
1482
|
+
className: y.toolbar,
|
|
1472
1483
|
style: w.toolbar
|
|
1473
|
-
}), /* @__PURE__ */
|
|
1484
|
+
}), /* @__PURE__ */ l.createElement("div", {
|
|
1474
1485
|
ref: A,
|
|
1475
1486
|
id: "rte-editor-body",
|
|
1476
|
-
className: `rte-editor ${(
|
|
1487
|
+
className: `rte-editor ${(y == null ? void 0 : y.editor) || ""}`,
|
|
1477
1488
|
style: w.editor,
|
|
1478
1489
|
contentEditable: !0,
|
|
1479
1490
|
suppressContentEditableWarning: !0,
|
|
@@ -1491,39 +1502,39 @@ const Yt = ({
|
|
|
1491
1502
|
onClick: (e) => {
|
|
1492
1503
|
nt(e), W(), pe();
|
|
1493
1504
|
}
|
|
1494
|
-
}), /* @__PURE__ */
|
|
1495
|
-
show:
|
|
1496
|
-
position:
|
|
1505
|
+
}), /* @__PURE__ */ l.createElement(Bt, {
|
|
1506
|
+
show: I,
|
|
1507
|
+
position: V,
|
|
1497
1508
|
filtered: ee,
|
|
1498
1509
|
insertMention: Be,
|
|
1499
1510
|
onClose: () => _(!1),
|
|
1500
1511
|
query: _e
|
|
1501
|
-
}), s && /* @__PURE__ */
|
|
1502
|
-
className: `rte-output ${(
|
|
1512
|
+
}), s && /* @__PURE__ */ l.createElement("div", {
|
|
1513
|
+
className: `rte-output ${(y == null ? void 0 : y.output) || ""}`,
|
|
1503
1514
|
style: w.output
|
|
1504
|
-
}, /* @__PURE__ */
|
|
1505
|
-
visible:
|
|
1506
|
-
x:
|
|
1507
|
-
y:
|
|
1515
|
+
}, /* @__PURE__ */ l.createElement("h4", null, "Output HTML:"), /* @__PURE__ */ l.createElement("p", null, q)), /* @__PURE__ */ l.createElement(Vt, {
|
|
1516
|
+
visible: H.visible,
|
|
1517
|
+
x: H.x,
|
|
1518
|
+
y: H.y,
|
|
1508
1519
|
onAction: Ge,
|
|
1509
1520
|
onClose: () => {
|
|
1510
|
-
h(ie(ce({},
|
|
1521
|
+
h(ie(ce({}, H), {
|
|
1511
1522
|
visible: !1
|
|
1512
1523
|
})), he();
|
|
1513
1524
|
}
|
|
1514
|
-
}), /* @__PURE__ */
|
|
1525
|
+
}), /* @__PURE__ */ l.createElement($t, {
|
|
1515
1526
|
visible: C,
|
|
1516
|
-
linkData:
|
|
1527
|
+
linkData: Oe,
|
|
1517
1528
|
onClose: () => j(!1),
|
|
1518
1529
|
onInsert: tt
|
|
1519
|
-
})), d ? /* @__PURE__ */
|
|
1520
|
-
className:
|
|
1530
|
+
})), d ? /* @__PURE__ */ l.createElement(Ut, {
|
|
1531
|
+
className: y.preview,
|
|
1521
1532
|
style: w.preview,
|
|
1522
1533
|
html: q
|
|
1523
1534
|
}) : null);
|
|
1524
1535
|
};
|
|
1525
1536
|
export {
|
|
1526
1537
|
Yt as RichTextEditor,
|
|
1527
|
-
|
|
1538
|
+
Ut as RtePreview,
|
|
1528
1539
|
qt as RteToolbar
|
|
1529
1540
|
};
|