@seafile/comment-editor 0.0.1-alpha.75 → 0.0.1-alpha.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/basic-sdk/editor/comment-editor.js +227 -216
- package/package.json +1 -1
|
@@ -30,11 +30,10 @@ var _slateToMd = _interopRequireDefault(require("../slate-convert/slate-to-md"))
|
|
|
30
30
|
var _eventBus = _interopRequireDefault(require("../utils/event-bus"));
|
|
31
31
|
var _eventHandler = _interopRequireDefault(require("../utils/event-handler"));
|
|
32
32
|
require("./comment-editor.css");
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
const getSubmitTip = (type, content) => {
|
|
34
|
+
if (content) return 'Save';
|
|
35
|
+
return type === 'comment' ? 'Comment' : 'Reply';
|
|
36
|
+
};
|
|
38
37
|
const DEFAULT_PLACEHOLDER = 'Enter_comment_shift_enter_for_new_line_Enter_to_send';
|
|
39
38
|
const CommentEditor = _ref => {
|
|
40
39
|
let {
|
|
@@ -47,223 +46,235 @@ const CommentEditor = _ref => {
|
|
|
47
46
|
toolMenus = ['text_style', _constants2.BLOCKQUOTE, _constants2.UNORDERED_LIST, _constants2.ORDERED_LIST, _constants2.LINK, _constants2.IMAGE],
|
|
48
47
|
closePanel
|
|
49
48
|
} = _ref;
|
|
50
|
-
|
|
49
|
+
const commentWrapperRef = (0, _react.useRef)();
|
|
51
50
|
const {
|
|
52
51
|
t
|
|
53
52
|
} = (0, _reactI18next.useTranslation)('sdoc-editor');
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
// return () => {
|
|
111
|
-
// unsubscribePostComment();
|
|
112
|
-
// };
|
|
113
|
-
// }, [onSubmitByEnterKey]);
|
|
114
|
-
|
|
115
|
-
// const onCancel = useCallback((event) => {
|
|
116
|
-
// event.stopPropagation();
|
|
117
|
-
// const { type: eventType, keyCode, target } = event;
|
|
118
|
-
// if (eventType === 'keydown' && keyCode !== KeyCodes.Esc) return;
|
|
119
|
-
// if (eventType === 'click') {
|
|
120
|
-
// const isSdocContentWrapper = target.classList.contains('sdoc-content-wrapper');
|
|
121
|
-
// const listContainer = window.document.querySelector('#global-comment-list-container');
|
|
122
|
-
// const resizeContainer = window.document.querySelector('.sdoc-comment-resize-handler');
|
|
123
|
-
// const isClickOnListContainer = listContainer && listContainer.contains(target);
|
|
124
|
-
// const isClickOnCommentEditorContainer = commentWrapperRef.current.contains(target);
|
|
125
|
-
// const isClickResizeContainer = resizeContainer && resizeContainer.contains(target);
|
|
126
|
-
// const isPreventCancel = isClickOnListContainer || isClickOnCommentEditorContainer || isClickResizeContainer || isSdocContentWrapper;
|
|
127
|
-
// if (isPreventCancel) return;
|
|
128
|
-
// }
|
|
129
|
-
// hiddenComment && hiddenComment(false);
|
|
130
|
-
|
|
131
|
-
// if (onContentChange) {
|
|
132
|
-
// if (editor.children.find(n => Node.string(n).trim())) {
|
|
133
|
-
// onContentChange(slateToMdString(editor.children));
|
|
134
|
-
// } else {
|
|
135
|
-
// onContentChange(null);
|
|
136
|
-
// }
|
|
137
|
-
// }
|
|
138
|
-
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
139
|
-
// }, []);
|
|
140
|
-
|
|
141
|
-
// // set editor children
|
|
142
|
-
// useEffect(() => {
|
|
143
|
-
// let children = mdStringToSlate(content);
|
|
144
|
-
// editor.children = children;
|
|
145
|
-
// // Transforms.select(editor, Editor.end(editor, []));
|
|
146
|
-
// }, [editor, content]);
|
|
147
|
-
|
|
148
|
-
// // useMount: focus editor
|
|
149
|
-
// useEffect(() => {
|
|
150
|
-
// const [firstNode] = editor.children;
|
|
151
|
-
// if (firstNode) {
|
|
152
|
-
// const [firstNodeFirstChild] = firstNode.children;
|
|
153
|
-
|
|
154
|
-
// if (firstNodeFirstChild) {
|
|
155
|
-
// const endOfFirstNode = Editor.end(editor, [0, 0]);
|
|
156
|
-
// const range = {
|
|
157
|
-
// anchor: endOfFirstNode,
|
|
158
|
-
// focus: endOfFirstNode,
|
|
159
|
-
// };
|
|
160
|
-
// // focusEditor(editor, range);
|
|
161
|
-
// }
|
|
162
|
-
// // Force refresh to fix comment list
|
|
163
|
-
// // setSlateValue([...editor.children]);
|
|
164
|
-
// }
|
|
165
|
-
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
166
|
-
// }, []);
|
|
167
|
-
|
|
168
|
-
// const handleFocusEditor = (e) => {
|
|
169
|
-
// if (e.target === commentEditorContainerRef.current) {
|
|
170
|
-
// const focusPoint = Editor.end(editor, []);
|
|
171
|
-
// focusEditor(editor, focusPoint);
|
|
172
|
-
// }
|
|
173
|
-
// };
|
|
174
|
-
|
|
175
|
-
// const handleScrollIntoView = useCallback((editor, domRange) => {
|
|
176
|
-
// try {
|
|
177
|
-
// const { selection } = editor;
|
|
178
|
-
// // Do not scroll into view, when focus on image
|
|
179
|
-
// const [imageNodeEntry] = Editor.nodes(editor, {
|
|
180
|
-
// match: n => [IMAGE, IMAGE_BLOCK].includes(n.type),
|
|
181
|
-
// at: selection
|
|
182
|
-
// });
|
|
183
|
-
// if (imageNodeEntry) return;
|
|
184
|
-
// const focusedNode = Node.get(editor, selection.focus.path);
|
|
185
|
-
// const domNode = ReactEditor.toDOMNode(editor, focusedNode);
|
|
186
|
-
// if (!domNode) return;
|
|
187
|
-
// scrollIntoView(domNode, { 'scrollMode': 'if-needed' });
|
|
188
|
-
// } catch (error) {
|
|
189
|
-
// //
|
|
190
|
-
// }
|
|
191
|
-
// }, []);
|
|
192
|
-
|
|
193
|
-
// const onMouseDown = useCallback((event) => {
|
|
194
|
-
// if (event.button === 0) {
|
|
195
|
-
// // Compatible with the editor which unload table plugin
|
|
196
|
-
// editor.reSetTableSelectedRange && editor.reSetTableSelectedRange();
|
|
197
|
-
// const eventBus = EventBus.getInstance();
|
|
198
|
-
// eventBus.dispatch(INTERNAL_EVENT.CANCEL_TABLE_SELECT_RANGE);
|
|
199
|
-
// }
|
|
200
|
-
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
201
|
-
// }, []);
|
|
202
|
-
|
|
203
|
-
// const onKeyDown = useCallback((event) => {
|
|
204
|
-
// if (isHotkey('enter', event)) {
|
|
205
|
-
// event.preventDefault();
|
|
206
|
-
// const eventBus = EventBus.getInstance();
|
|
207
|
-
// eventBus.dispatch(INTERNAL_EVENT.COMMENT_EDITOR_POST_COMMENT, event);
|
|
208
|
-
// return;
|
|
209
|
-
// }
|
|
210
|
-
|
|
211
|
-
// if (isHotkey('shift+enter', event)) {
|
|
212
|
-
// event.preventDefault();
|
|
213
|
-
// Editor.insertBreak(editor);
|
|
214
|
-
// return;
|
|
215
|
-
// }
|
|
53
|
+
const {
|
|
54
|
+
className,
|
|
55
|
+
userInfo,
|
|
56
|
+
type,
|
|
57
|
+
addParticipants
|
|
58
|
+
} = (0, _useComment.useComment)();
|
|
59
|
+
const submitTip = (0, _react.useMemo)(() => getSubmitTip(type, content), [content, type]);
|
|
60
|
+
const document = (0, _react.useMemo)(() => {
|
|
61
|
+
const cursor = {};
|
|
62
|
+
let elements = null;
|
|
63
|
+
elements = [(0, _core.generateEmptyElement)(_constants2.PARAGRAPH, {
|
|
64
|
+
placeholder
|
|
65
|
+
})];
|
|
66
|
+
return {
|
|
67
|
+
elements,
|
|
68
|
+
cursor
|
|
69
|
+
};
|
|
70
|
+
}, [placeholder]);
|
|
71
|
+
const [slateValue, setSlateValue] = (0, _react.useState)(document.elements);
|
|
72
|
+
const commentEditorContainerRef = (0, _react.useRef)(null);
|
|
73
|
+
const editor = (0, _react.useMemo)(() => {
|
|
74
|
+
const defaultEditor = (0, _extension.createCommentEditor)();
|
|
75
|
+
const newEditor = (0, _nodeId.default)(defaultEditor);
|
|
76
|
+
const {
|
|
77
|
+
cursors
|
|
78
|
+
} = document;
|
|
79
|
+
newEditor.cursors = cursors || {};
|
|
80
|
+
newEditor.width = _constants.COMMENT_EDITOR_EDIT_AREA_WIDTH; // default width
|
|
81
|
+
newEditor.editorType = _constants.COMMENT_EDITOR;
|
|
82
|
+
return newEditor;
|
|
83
|
+
}, [document]);
|
|
84
|
+
const {
|
|
85
|
+
cursors
|
|
86
|
+
} = (0, _useCursors.useCursors)(editor);
|
|
87
|
+
const decorate = (0, _decorates.usePipDecorate)(editor);
|
|
88
|
+
// init eventHandler
|
|
89
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
90
|
+
const eventProxy = (0, _react.useMemo)(() => new _eventHandler.default(editor), []);
|
|
91
|
+
const onSubmit = (0, _react.useCallback)(event => {
|
|
92
|
+
event && event.stopPropagation();
|
|
93
|
+
const mdString = (0, _slateToMd.default)(editor.children);
|
|
94
|
+
if (mdString && mdString.trim()) insertContent(mdString);
|
|
95
|
+
addParticipants && addParticipants(userInfo.username);
|
|
96
|
+
editor.children = [(0, _core.generateEmptyElement)(_constants2.PARAGRAPH, {
|
|
97
|
+
placeholder
|
|
98
|
+
})];
|
|
99
|
+
_slate.Transforms.select(editor, _slate.Editor.start(editor, []));
|
|
100
|
+
onContentChange && onContentChange(null);
|
|
101
|
+
closePanel && closePanel();
|
|
102
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
103
|
+
}, [editor, insertContent, addParticipants, placeholder, onContentChange, closePanel]);
|
|
104
|
+
const onSubmitByEnterKey = (0, _react.useCallback)(event => {
|
|
105
|
+
if (!_slateReact.ReactEditor.isFocused(editor)) return;
|
|
106
|
+
onSubmit(event);
|
|
107
|
+
}, [editor, onSubmit]);
|
|
216
108
|
|
|
217
|
-
//
|
|
109
|
+
// addEventListener
|
|
110
|
+
(0, _react.useEffect)(() => {
|
|
111
|
+
const eventBus = _eventBus.default.getInstance();
|
|
112
|
+
const unsubscribePostComment = eventBus.subscribe(_constants.INTERNAL_EVENT.COMMENT_EDITOR_POST_COMMENT, onSubmitByEnterKey);
|
|
113
|
+
return () => {
|
|
114
|
+
unsubscribePostComment();
|
|
115
|
+
};
|
|
116
|
+
}, [onSubmitByEnterKey]);
|
|
117
|
+
const onCancel = (0, _react.useCallback)(event => {
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
const {
|
|
120
|
+
type: eventType,
|
|
121
|
+
keyCode,
|
|
122
|
+
target
|
|
123
|
+
} = event;
|
|
124
|
+
if (eventType === 'keydown' && keyCode !== _constants.KeyCodes.Esc) return;
|
|
125
|
+
if (eventType === 'click') {
|
|
126
|
+
const isSdocContentWrapper = target.classList.contains('sdoc-content-wrapper');
|
|
127
|
+
const listContainer = window.document.querySelector('#global-comment-list-container');
|
|
128
|
+
const resizeContainer = window.document.querySelector('.sdoc-comment-resize-handler');
|
|
129
|
+
const isClickOnListContainer = listContainer && listContainer.contains(target);
|
|
130
|
+
const isClickOnCommentEditorContainer = commentWrapperRef.current.contains(target);
|
|
131
|
+
const isClickResizeContainer = resizeContainer && resizeContainer.contains(target);
|
|
132
|
+
const isPreventCancel = isClickOnListContainer || isClickOnCommentEditorContainer || isClickResizeContainer || isSdocContentWrapper;
|
|
133
|
+
if (isPreventCancel) return;
|
|
134
|
+
}
|
|
135
|
+
hiddenComment && hiddenComment(false);
|
|
136
|
+
if (onContentChange) {
|
|
137
|
+
if (editor.children.find(n => _slate.Node.string(n).trim())) {
|
|
138
|
+
onContentChange((0, _slateToMd.default)(editor.children));
|
|
139
|
+
} else {
|
|
140
|
+
onContentChange(null);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
144
|
+
}, []);
|
|
218
145
|
|
|
219
|
-
//
|
|
146
|
+
// set editor children
|
|
147
|
+
(0, _react.useEffect)(() => {
|
|
148
|
+
let children = (0, _mdToSlate.default)(content);
|
|
149
|
+
editor.children = children;
|
|
150
|
+
// Transforms.select(editor, Editor.end(editor, []));
|
|
151
|
+
}, [editor, content]);
|
|
220
152
|
|
|
153
|
+
// useMount: focus editor
|
|
154
|
+
(0, _react.useEffect)(() => {
|
|
155
|
+
const [firstNode] = editor.children;
|
|
156
|
+
if (firstNode) {
|
|
157
|
+
const [firstNodeFirstChild] = firstNode.children;
|
|
158
|
+
if (firstNodeFirstChild) {
|
|
159
|
+
const endOfFirstNode = _slate.Editor.end(editor, [0, 0]);
|
|
160
|
+
const range = {
|
|
161
|
+
anchor: endOfFirstNode,
|
|
162
|
+
focus: endOfFirstNode
|
|
163
|
+
};
|
|
164
|
+
// focusEditor(editor, range);
|
|
165
|
+
}
|
|
166
|
+
// Force refresh to fix comment list
|
|
167
|
+
// setSlateValue([...editor.children]);
|
|
168
|
+
}
|
|
169
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
170
|
+
}, []);
|
|
171
|
+
const handleFocusEditor = e => {
|
|
172
|
+
if (e.target === commentEditorContainerRef.current) {
|
|
173
|
+
const focusPoint = _slate.Editor.end(editor, []);
|
|
174
|
+
(0, _core.focusEditor)(editor, focusPoint);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const handleScrollIntoView = (0, _react.useCallback)((editor, domRange) => {
|
|
178
|
+
try {
|
|
179
|
+
const {
|
|
180
|
+
selection
|
|
181
|
+
} = editor;
|
|
182
|
+
// Do not scroll into view, when focus on image
|
|
183
|
+
const [imageNodeEntry] = _slate.Editor.nodes(editor, {
|
|
184
|
+
match: n => [_constants2.IMAGE, _constants2.IMAGE_BLOCK].includes(n.type),
|
|
185
|
+
at: selection
|
|
186
|
+
});
|
|
187
|
+
if (imageNodeEntry) return;
|
|
188
|
+
const focusedNode = _slate.Node.get(editor, selection.focus.path);
|
|
189
|
+
const domNode = _slateReact.ReactEditor.toDOMNode(editor, focusedNode);
|
|
190
|
+
if (!domNode) return;
|
|
191
|
+
(0, _scrollIntoViewIfNeeded.default)(domNode, {
|
|
192
|
+
'scrollMode': 'if-needed'
|
|
193
|
+
});
|
|
194
|
+
} catch (error) {
|
|
195
|
+
//
|
|
196
|
+
}
|
|
197
|
+
}, []);
|
|
198
|
+
const onMouseDown = (0, _react.useCallback)(event => {
|
|
199
|
+
if (event.button === 0) {
|
|
200
|
+
// Compatible with the editor which unload table plugin
|
|
201
|
+
editor.reSetTableSelectedRange && editor.reSetTableSelectedRange();
|
|
202
|
+
const eventBus = _eventBus.default.getInstance();
|
|
203
|
+
eventBus.dispatch(_constants.INTERNAL_EVENT.CANCEL_TABLE_SELECT_RANGE);
|
|
204
|
+
}
|
|
205
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
206
|
+
}, []);
|
|
207
|
+
const onKeyDown = (0, _react.useCallback)(event => {
|
|
208
|
+
if ((0, _isHotkey.default)('enter', event)) {
|
|
209
|
+
event.preventDefault();
|
|
210
|
+
const eventBus = _eventBus.default.getInstance();
|
|
211
|
+
eventBus.dispatch(_constants.INTERNAL_EVENT.COMMENT_EDITOR_POST_COMMENT, event);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
if ((0, _isHotkey.default)('shift+enter', event)) {
|
|
215
|
+
event.preventDefault();
|
|
216
|
+
_slate.Editor.insertBreak(editor);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
eventProxy.onKeyDown(event);
|
|
220
|
+
}, [eventProxy, editor]);
|
|
221
221
|
console.log('toolMenus', toolMenus);
|
|
222
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
222
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
223
|
+
className: (0, _classnames.default)('comment-editor-wrapper', className),
|
|
224
|
+
ref: commentWrapperRef
|
|
225
|
+
}, type === 'comment' && !hiddenUserInfo && /*#__PURE__*/_react.default.createElement("div", {
|
|
226
|
+
className: "comment-editor-user-info"
|
|
227
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
228
|
+
className: "comment-editor-user-img"
|
|
229
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
230
|
+
src: userInfo.avatar_url,
|
|
231
|
+
alt: "",
|
|
232
|
+
height: "100%",
|
|
233
|
+
width: "100%"
|
|
234
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
235
|
+
className: "comment-editor-user-name"
|
|
236
|
+
}, userInfo.name)), /*#__PURE__*/_react.default.createElement("div", {
|
|
237
|
+
className: "comment-editor-container"
|
|
238
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
239
|
+
className: "comment-editor-content"
|
|
240
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
241
|
+
ref: commentEditorContainerRef,
|
|
242
|
+
className: "article comment-editor",
|
|
243
|
+
onClick: handleFocusEditor
|
|
244
|
+
}, /*#__PURE__*/_react.default.createElement(_useScrollContext.ScrollContext.Provider, {
|
|
245
|
+
value: {
|
|
246
|
+
scrollRef: commentEditorContainerRef
|
|
247
|
+
}
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement(_slateReact.Slate, {
|
|
249
|
+
editor: editor,
|
|
250
|
+
value: slateValue,
|
|
251
|
+
onChange: setSlateValue
|
|
252
|
+
}, /*#__PURE__*/_react.default.createElement(_slateReact.Editable, {
|
|
253
|
+
id: "sdoc-editor",
|
|
254
|
+
scrollSelectionIntoView: handleScrollIntoView,
|
|
255
|
+
cursors: cursors,
|
|
256
|
+
renderElement: props => (0, _renderCommentEditorElement.default)({
|
|
257
|
+
...props,
|
|
258
|
+
commentType: type
|
|
259
|
+
}),
|
|
260
|
+
renderLeaf: _extension.renderLeaf,
|
|
261
|
+
onMouseDown: onMouseDown,
|
|
262
|
+
decorate: decorate,
|
|
263
|
+
onCut: eventProxy.onCut,
|
|
264
|
+
onCopy: eventProxy.onCopy,
|
|
265
|
+
onCompositionStart: eventProxy.onCompositionStart,
|
|
266
|
+
onCompositionUpdate: eventProxy.onCompositionUpdate,
|
|
267
|
+
onCompositionEnd: eventProxy.onCompositionEnd,
|
|
268
|
+
onKeyDown: onKeyDown,
|
|
269
|
+
onBeforeInput: eventProxy.onBeforeInput
|
|
270
|
+
})))), /*#__PURE__*/_react.default.createElement(_commentEditorToolbar.default, {
|
|
271
|
+
editor: editor,
|
|
272
|
+
toolMenus: toolMenus,
|
|
273
|
+
onSubmit: onSubmit,
|
|
274
|
+
submitBtnText: t(submitTip),
|
|
275
|
+
onCancel: onCancel
|
|
276
|
+
}))), toolMenus.includes(_constants2.IMAGE) && /*#__PURE__*/_react.default.createElement(_insertElementDialog.default, {
|
|
277
|
+
editor: editor
|
|
278
|
+
}));
|
|
268
279
|
};
|
|
269
280
|
var _default = exports.default = CommentEditor;
|