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