@logora/debate 0.3.74 → 0.3.76
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/assets/components/argument/argument/Argument.module-QZdPjj_i.css +1 -0
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css +1 -0
- package/dist/assets/components/input/text_editor/{TextEditor.module-DePSfOvG.css → TextEditor.module-CxuSL3l3.css} +1 -1
- package/dist/assets/components/section/section_box/SectionBox.module-qQs4B6bf.css +1 -0
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-DUPbI-wb.css +1 -0
- package/dist/assets/components/source/source_list_item/SourceListItem.module-fm_uHuY4.css +1 -0
- package/dist/assets/components/summary/summary/Summary.module-2bnx3egy.css +1 -0
- package/dist/assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css +1 -0
- package/dist/assets/components/vote/vote_box/VoteBox.module-C9Q6gBw3.css +1 -0
- package/dist/components/argument/argument/Argument.js +112 -108
- package/dist/components/argument/argument/Argument.module.scss.js +31 -31
- package/dist/components/consultation/consultation_box/ConsultationBox.js +80 -111
- package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +31 -29
- package/dist/components/dialog/dropdown/Dropdown.js +35 -28
- package/dist/components/icons/spiegel_icons/Downvote.js +6 -0
- package/dist/components/icons/spiegel_icons/Upvote.js +6 -0
- package/dist/components/icons/spiegel_icons/index.js +46 -46
- package/dist/components/icons/stern_icons/index.js +100 -70
- package/dist/components/input/argument_input/ArgumentInput.js +142 -142
- package/dist/components/input/select/Select.js +19 -19
- package/dist/components/input/text_editor/TextEditor.js +135 -124
- package/dist/components/input/text_editor/TextEditor.module.scss.js +5 -5
- package/dist/components/input/text_editor/plugins/SetContentPlugin.js +13 -13
- package/dist/components/input/text_editor/plugins/SetRichContentPlugin.js +10 -10
- package/dist/components/list/paginated_list/PaginatedList.js +112 -110
- package/dist/components/notification/notification_menu/NotificationMenu.js +23 -22
- package/dist/components/proposal/proposal_box/ProposalBox.js +8 -10
- package/dist/components/section/section_box/SectionBox.js +10 -10
- package/dist/components/section/section_box/SectionBox.module.scss.js +9 -9
- package/dist/components/source/context_source_list/ContextSourceList.js +8 -7
- package/dist/components/source/context_source_list/ContextSourceList.module.scss.js +14 -12
- package/dist/components/source/source_list_item/SourceListItem.js +42 -28
- package/dist/components/source/source_list_item/SourceListItem.module.scss.js +8 -6
- package/dist/components/summary/summary/Summary.js +41 -63
- package/dist/components/summary/summary/Summary.module.scss.js +10 -6
- package/dist/components/summary/summary_box/SummaryBox.module.scss.js +9 -9
- package/dist/components/vote/vote_box/VoteBox.js +123 -145
- package/dist/components/vote/vote_box/VoteBox.module.scss.js +50 -50
- package/package.json +1 -1
- package/dist/assets/components/argument/argument/Argument.module-gLfNRLks.css +0 -1
- package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-BnTr5IaF.css +0 -1
- package/dist/assets/components/section/section_box/SectionBox.module-DUeUtdWr.css +0 -1
- package/dist/assets/components/source/context_source_list/ContextSourceList.module-D6X_0dB7.css +0 -1
- package/dist/assets/components/source/source_list_item/SourceListItem.module-mTxHhXPV.css +0 -1
- package/dist/assets/components/summary/summary/Summary.module-DjfmUlkW.css +0 -1
- package/dist/assets/components/summary/summary_box/SummaryBox.module-DQVkA8l7.css +0 -1
- package/dist/assets/components/vote/vote_box/VoteBox.module-CDrqb2SZ.css +0 -1
|
@@ -1,171 +1,182 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ListNode as
|
|
3
|
-
import { OverflowNode as
|
|
4
|
-
import { CharacterLimitPlugin as
|
|
5
|
-
import { LexicalComposer as
|
|
6
|
-
import { ContentEditable as
|
|
7
|
-
import { EditorRefPlugin as
|
|
8
|
-
import { LexicalErrorBoundary as
|
|
9
|
-
import { HistoryPlugin as
|
|
10
|
-
import { ListPlugin as
|
|
11
|
-
import { OnChangePlugin as
|
|
12
|
-
import { RichTextPlugin as
|
|
13
|
-
import { QuoteNode as
|
|
1
|
+
import { jsxs as p, Fragment as Z, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { ListNode as oo, ListItemNode as to } from "@lexical/list";
|
|
3
|
+
import { OverflowNode as eo } from "@lexical/overflow";
|
|
4
|
+
import { CharacterLimitPlugin as ro } from "@lexical/react/LexicalCharacterLimitPlugin";
|
|
5
|
+
import { LexicalComposer as io } from "@lexical/react/LexicalComposer";
|
|
6
|
+
import { ContentEditable as no } from "@lexical/react/LexicalContentEditable";
|
|
7
|
+
import { EditorRefPlugin as so } from "@lexical/react/LexicalEditorRefPlugin";
|
|
8
|
+
import { LexicalErrorBoundary as co } from "@lexical/react/LexicalErrorBoundary";
|
|
9
|
+
import { HistoryPlugin as lo } from "@lexical/react/LexicalHistoryPlugin";
|
|
10
|
+
import { ListPlugin as mo } from "@lexical/react/LexicalListPlugin";
|
|
11
|
+
import { OnChangePlugin as ao } from "@lexical/react/LexicalOnChangePlugin";
|
|
12
|
+
import { RichTextPlugin as uo } from "@lexical/react/LexicalRichTextPlugin";
|
|
13
|
+
import { QuoteNode as fo } from "@lexical/rich-text";
|
|
14
14
|
import I from "classnames";
|
|
15
|
-
import { $getRoot as
|
|
16
|
-
import { useState as
|
|
17
|
-
import { useIntl as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { AutoSavePlugin as
|
|
21
|
-
import { FocusPlugin as
|
|
22
|
-
import { MaxLengthPlugin as
|
|
23
|
-
import { ResetPlugin as
|
|
24
|
-
import { SetContentPlugin as
|
|
25
|
-
import { SetRichContentPlugin as
|
|
26
|
-
import { ToolbarPlugin as
|
|
27
|
-
import { useModal as
|
|
28
|
-
import { SourceModal as
|
|
29
|
-
import { SourceListItem as
|
|
30
|
-
const
|
|
31
|
-
placeholder:
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
import { $getRoot as po } from "lexical";
|
|
16
|
+
import { useState as d, useId as ho, useEffect as go } from "react";
|
|
17
|
+
import { useIntl as So } from "react-intl";
|
|
18
|
+
import xo from "./EditorTheme.js";
|
|
19
|
+
import i from "./TextEditor.module.scss.js";
|
|
20
|
+
import { AutoSavePlugin as vo } from "./plugins/AutoSavePlugin.js";
|
|
21
|
+
import { FocusPlugin as Co } from "./plugins/FocusPlugin.js";
|
|
22
|
+
import { MaxLengthPlugin as Po } from "./plugins/MaxLengthPlugin.js";
|
|
23
|
+
import { ResetPlugin as To } from "./plugins/ResetPlugin.js";
|
|
24
|
+
import { SetContentPlugin as No } from "./plugins/SetContentPlugin.js";
|
|
25
|
+
import { SetRichContentPlugin as Eo } from "./plugins/SetRichContentPlugin.js";
|
|
26
|
+
import { ToolbarPlugin as Io } from "./plugins/ToolbarPlugin.js";
|
|
27
|
+
import { useModal as Ro } from "../../dialog/modal/useModal.js";
|
|
28
|
+
import { SourceModal as bo } from "../../source/source_modal/SourceModal.js";
|
|
29
|
+
import { SourceListItem as Mo } from "../../source/source_list_item/SourceListItem.js";
|
|
30
|
+
const R = (c) => c?.replace(/ /g, " "), it = ({
|
|
31
|
+
placeholder: c,
|
|
32
|
+
initialContent: b,
|
|
33
|
+
initialRichContent: M,
|
|
34
|
+
onSubmit: h,
|
|
35
|
+
sources: u,
|
|
34
36
|
hideSubmit: y = !1,
|
|
35
|
-
hideSourceAction:
|
|
36
|
-
onActivation:
|
|
37
|
-
disabled:
|
|
38
|
-
handleChange:
|
|
39
|
-
handleSourcesChange:
|
|
40
|
-
shortBar:
|
|
41
|
-
active:
|
|
42
|
-
maxLength:
|
|
43
|
-
disableRichText:
|
|
44
|
-
editorRef:
|
|
45
|
-
uid:
|
|
46
|
-
allowedDomains:
|
|
47
|
-
hideCharCount:
|
|
48
|
-
disableAutoActivate:
|
|
49
|
-
...
|
|
37
|
+
hideSourceAction: w = !1,
|
|
38
|
+
onActivation: g,
|
|
39
|
+
disabled: A = !1,
|
|
40
|
+
handleChange: S,
|
|
41
|
+
handleSourcesChange: f,
|
|
42
|
+
shortBar: L = !1,
|
|
43
|
+
active: x = !1,
|
|
44
|
+
maxLength: l,
|
|
45
|
+
disableRichText: _ = !1,
|
|
46
|
+
editorRef: B,
|
|
47
|
+
uid: v,
|
|
48
|
+
allowedDomains: C = [],
|
|
49
|
+
hideCharCount: F = !1,
|
|
50
|
+
disableAutoActivate: O = !1,
|
|
51
|
+
...U
|
|
50
52
|
}) => {
|
|
51
|
-
const [n,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, [
|
|
55
|
-
x && s.length > 0 && x(s);
|
|
56
|
-
}, [s]);
|
|
53
|
+
const [n, j] = d(!1), [k, z] = d(""), [H, J] = d(""), [m, a] = d([]), { showModal: Q } = Ro(), P = So(), T = ho();
|
|
54
|
+
go(() => {
|
|
55
|
+
u && a(u);
|
|
56
|
+
}, [u]);
|
|
57
57
|
const N = () => {
|
|
58
|
-
n || (
|
|
59
|
-
},
|
|
60
|
-
editable: !
|
|
61
|
-
theme:
|
|
62
|
-
onError(
|
|
63
|
-
console.error("TextEditor error:",
|
|
58
|
+
n || (j(!0), g && g());
|
|
59
|
+
}, W = {
|
|
60
|
+
editable: !A,
|
|
61
|
+
theme: xo,
|
|
62
|
+
onError(t) {
|
|
63
|
+
console.error("TextEditor error:", t);
|
|
64
64
|
},
|
|
65
|
-
nodes: [
|
|
66
|
-
},
|
|
65
|
+
nodes: [oo, to, fo, eo]
|
|
66
|
+
}, $ = () => {
|
|
67
67
|
N();
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
68
|
+
}, q = (t) => {
|
|
69
|
+
t.read(() => {
|
|
70
|
+
const e = po().getTextContent(), r = R(e), s = JSON.stringify(t), E = R(s);
|
|
71
|
+
z(r), J(E), S && S(r, E);
|
|
72
72
|
});
|
|
73
|
-
},
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
73
|
+
}, D = (t) => {
|
|
74
|
+
const e = k, r = H, s = m;
|
|
75
|
+
h && (t.preventDefault(), h(e, r, s)), a([]), f?.([]);
|
|
76
|
+
}, G = () => {
|
|
77
|
+
Q(
|
|
78
|
+
/* @__PURE__ */ o(
|
|
79
|
+
bo,
|
|
80
80
|
{
|
|
81
|
-
onAddSource:
|
|
82
|
-
allowedSources:
|
|
81
|
+
onAddSource: K,
|
|
82
|
+
allowedSources: C
|
|
83
83
|
}
|
|
84
84
|
)
|
|
85
85
|
);
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
}, K = (t) => {
|
|
87
|
+
a((e) => {
|
|
88
|
+
const r = [...e, t];
|
|
89
|
+
return f?.(r), r;
|
|
90
|
+
});
|
|
91
|
+
}, V = (t) => {
|
|
92
|
+
a((e) => {
|
|
93
|
+
const r = e.filter(
|
|
94
|
+
(s) => s.source_url !== t.source_url
|
|
95
|
+
);
|
|
96
|
+
return f?.(r), r;
|
|
97
|
+
});
|
|
98
|
+
}, X = (t, e) => /* @__PURE__ */ o(
|
|
99
|
+
Mo,
|
|
90
100
|
{
|
|
91
|
-
publisher:
|
|
92
|
-
url:
|
|
93
|
-
title:
|
|
94
|
-
index:
|
|
101
|
+
publisher: t.publisher,
|
|
102
|
+
url: t.source_url,
|
|
103
|
+
title: t.title,
|
|
104
|
+
index: e,
|
|
105
|
+
onRemove: () => V(t)
|
|
95
106
|
},
|
|
96
|
-
|
|
97
|
-
),
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
107
|
+
e
|
|
108
|
+
), Y = () => /* @__PURE__ */ o("div", { className: i.editorPlaceholder, children: c });
|
|
109
|
+
return /* @__PURE__ */ p(Z, { children: [
|
|
110
|
+
/* @__PURE__ */ o(io, { initialConfig: W, children: /* @__PURE__ */ o("div", { className: i.editorContainer, onClick: $, children: /* @__PURE__ */ p(
|
|
100
111
|
"div",
|
|
101
112
|
{
|
|
102
|
-
className: I(
|
|
103
|
-
[
|
|
113
|
+
className: I(i.editorInner, {
|
|
114
|
+
[i.editorInnerInactive]: !n && !x
|
|
104
115
|
}),
|
|
105
116
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
|
|
117
|
+
/* @__PURE__ */ o(
|
|
118
|
+
uo,
|
|
108
119
|
{
|
|
109
|
-
contentEditable: /* @__PURE__ */
|
|
110
|
-
|
|
120
|
+
contentEditable: /* @__PURE__ */ o(
|
|
121
|
+
no,
|
|
111
122
|
{
|
|
112
|
-
className: I(
|
|
113
|
-
[
|
|
123
|
+
className: I(i.editorInput, {
|
|
124
|
+
[i.editorInputInactive]: !n
|
|
114
125
|
}),
|
|
115
|
-
...
|
|
126
|
+
...U
|
|
116
127
|
}
|
|
117
128
|
),
|
|
118
|
-
placeholder:
|
|
119
|
-
ErrorBoundary:
|
|
129
|
+
placeholder: c && /* @__PURE__ */ o(Y, {}),
|
|
130
|
+
ErrorBoundary: co
|
|
120
131
|
}
|
|
121
132
|
),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
|
|
133
|
+
/* @__PURE__ */ o(
|
|
134
|
+
Io,
|
|
124
135
|
{
|
|
125
|
-
hideSourceAction:
|
|
136
|
+
hideSourceAction: w,
|
|
126
137
|
hideSubmit: y,
|
|
127
|
-
disableRichText:
|
|
128
|
-
shortBar:
|
|
129
|
-
onSubmit:
|
|
130
|
-
onAddSource:
|
|
131
|
-
isActive: n ||
|
|
132
|
-
sourceTooltip:
|
|
138
|
+
disableRichText: _,
|
|
139
|
+
shortBar: L,
|
|
140
|
+
onSubmit: D,
|
|
141
|
+
onAddSource: G,
|
|
142
|
+
isActive: n || x,
|
|
143
|
+
sourceTooltip: C?.length > 0 && P.formatMessage({
|
|
133
144
|
id: "input.allowed_domains_tooltip",
|
|
134
145
|
defaultMessage: "With the new source function, you can add links to your article."
|
|
135
146
|
})
|
|
136
147
|
}
|
|
137
148
|
),
|
|
138
|
-
n &&
|
|
139
|
-
/* @__PURE__ */
|
|
149
|
+
n && l && !F && /* @__PURE__ */ p("div", { className: i.charactersCount, children: [
|
|
150
|
+
/* @__PURE__ */ o(ro, { maxLength: l }),
|
|
140
151
|
" ",
|
|
141
|
-
|
|
152
|
+
P.formatMessage({
|
|
142
153
|
id: "input.remaining_chars",
|
|
143
154
|
defaultMessage: "remaining characters"
|
|
144
155
|
})
|
|
145
156
|
] }),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
157
|
+
/* @__PURE__ */ o(mo, {}),
|
|
158
|
+
/* @__PURE__ */ o(lo, {}),
|
|
159
|
+
/* @__PURE__ */ o(ao, { onChange: q, ignoreSelectionChange: !0 }),
|
|
160
|
+
/* @__PURE__ */ o(
|
|
161
|
+
vo,
|
|
151
162
|
{
|
|
152
|
-
onSetContent:
|
|
163
|
+
onSetContent: O ? () => {
|
|
153
164
|
} : N,
|
|
154
|
-
storageUid:
|
|
165
|
+
storageUid: v || T
|
|
155
166
|
}
|
|
156
167
|
),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ o(No, { content: b }),
|
|
169
|
+
/* @__PURE__ */ o(Eo, { richContent: M }),
|
|
170
|
+
/* @__PURE__ */ o(Co, {}),
|
|
171
|
+
l && /* @__PURE__ */ o(Po, { maxLength: l }),
|
|
172
|
+
/* @__PURE__ */ o(To, { storageUid: v || T }),
|
|
173
|
+
/* @__PURE__ */ o(so, { editorRef: B })
|
|
163
174
|
]
|
|
164
175
|
}
|
|
165
176
|
) }) }),
|
|
166
|
-
|
|
177
|
+
m && m.length !== 0 ? /* @__PURE__ */ o("div", { className: i.sourcesBox, children: /* @__PURE__ */ o("div", { className: i.sourceList, children: m.map(X) }) }) : null
|
|
167
178
|
] });
|
|
168
179
|
};
|
|
169
180
|
export {
|
|
170
|
-
|
|
181
|
+
it as TextEditor
|
|
171
182
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../../assets/components/input/text_editor/TextEditor.module-
|
|
1
|
+
import '../../../assets/components/input/text_editor/TextEditor.module-CxuSL3l3.css';const t = "_ltr_1k7lj_3", e = "_editorContainer_1k7lj_7", o = "_editorInner_1k7lj_14", r = "_editorInnerInactive_1k7lj_18", i = "_editorPlaceholder_1k7lj_23", n = "_editorInput_1k7lj_35", d = "_editorInputInactive_1k7lj_46", _ = "_editorTextBold_1k7lj_51", s = "_editorTextItalic_1k7lj_55", l = "_editorTextUnderline_1k7lj_59", c = "_editorTextStrikethrough_1k7lj_63", a = "_editorTextUnderlineStrikethrough_1k7lj_67", I = "_editorParagraph_1k7lj_71", k = "_editorQuote_1k7lj_81", u = "_editorListOl_1k7lj_91", h = "_editorListItem_1k7lj_98", j = "_editorNestedListItem_1k7lj_105", x = "_sourcesBox_1k7lj_118", T = "_sourceList_1k7lj_129", L = "_charactersCount_1k7lj_140", p = {
|
|
2
2
|
ltr: t,
|
|
3
3
|
editorContainer: e,
|
|
4
4
|
editorInner: o,
|
|
@@ -12,10 +12,10 @@ import '../../../assets/components/input/text_editor/TextEditor.module-DePSfOvG.
|
|
|
12
12
|
editorTextStrikethrough: c,
|
|
13
13
|
editorTextUnderlineStrikethrough: a,
|
|
14
14
|
editorParagraph: I,
|
|
15
|
-
editorQuote:
|
|
15
|
+
editorQuote: k,
|
|
16
16
|
editorListOl: u,
|
|
17
17
|
editorListItem: h,
|
|
18
|
-
editorNestedListItem:
|
|
18
|
+
editorNestedListItem: j,
|
|
19
19
|
sourcesBox: x,
|
|
20
20
|
sourceList: T,
|
|
21
21
|
charactersCount: L
|
|
@@ -30,10 +30,10 @@ export {
|
|
|
30
30
|
d as editorInputInactive,
|
|
31
31
|
h as editorListItem,
|
|
32
32
|
u as editorListOl,
|
|
33
|
-
|
|
33
|
+
j as editorNestedListItem,
|
|
34
34
|
I as editorParagraph,
|
|
35
35
|
i as editorPlaceholder,
|
|
36
|
-
|
|
36
|
+
k as editorQuote,
|
|
37
37
|
_ as editorTextBold,
|
|
38
38
|
s as editorTextItalic,
|
|
39
39
|
c as editorTextStrikethrough,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { useLexicalComposerContext as
|
|
2
|
-
import { $getRoot as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useInput as
|
|
5
|
-
const
|
|
6
|
-
const [
|
|
7
|
-
return
|
|
8
|
-
t &&
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
1
|
+
import { useLexicalComposerContext as a } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { $getRoot as c, $createParagraphNode as i, $createTextNode as u } from "lexical";
|
|
3
|
+
import { useEffect as f } from "react";
|
|
4
|
+
import { useInput as m } from "../../input_provider/useInput.js";
|
|
5
|
+
const x = ({ content: o }) => {
|
|
6
|
+
const [p] = a(), { inputContent: e, setInputContent: s } = m(), t = o || e;
|
|
7
|
+
return f(() => {
|
|
8
|
+
typeof t == "string" && t && p.update(() => {
|
|
9
|
+
const n = c();
|
|
10
|
+
n.clear();
|
|
11
|
+
const r = i();
|
|
12
|
+
r.append(u(t)), n.append(r), !o && e && s(null);
|
|
13
13
|
});
|
|
14
14
|
}, [t]), null;
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
x as SetContentPlugin
|
|
18
18
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useLexicalComposerContext as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { useInput as
|
|
4
|
-
const m = () => {
|
|
5
|
-
const [t] =
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
t.setEditorState(
|
|
1
|
+
import { useLexicalComposerContext as s } from "@lexical/react/LexicalComposerContext";
|
|
2
|
+
import { useEffect as u } from "react";
|
|
3
|
+
import { useInput as c } from "../../input_provider/useInput.js";
|
|
4
|
+
const m = ({ richContent: e }) => {
|
|
5
|
+
const [t] = s(), { inputRichContent: n, setInputRichContent: i } = c(), o = e || n;
|
|
6
|
+
return u(() => {
|
|
7
|
+
o && t.update(() => {
|
|
8
|
+
const r = t.parseEditorState(o);
|
|
9
|
+
t.setEditorState(r), !e && n && i(null);
|
|
10
10
|
});
|
|
11
|
-
}, [
|
|
11
|
+
}, [o]), null;
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
14
|
m as SetRichContentPlugin
|