@seafile/comment-editor 0.0.1-alpha.19 → 0.0.1-alpha.20
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.
|
@@ -37,6 +37,7 @@ const getSubmitTip = (type, content) => {
|
|
|
37
37
|
const DEFAULT_PLACEHOLDER = 'Enter_comment_shift_enter_for_new_line_Enter_to_send';
|
|
38
38
|
const CommentEditor = _ref => {
|
|
39
39
|
let {
|
|
40
|
+
commentContent,
|
|
40
41
|
content,
|
|
41
42
|
placeholder = DEFAULT_PLACEHOLDER,
|
|
42
43
|
insertContent,
|
|
@@ -156,6 +157,9 @@ const CommentEditor = _ref => {
|
|
|
156
157
|
// set editor children
|
|
157
158
|
(0, _react.useEffect)(() => {
|
|
158
159
|
let children = (0, _mdToSlate.default)(content);
|
|
160
|
+
if (commentContent) {
|
|
161
|
+
children = (0, _mdToSlate.default)(commentContent);
|
|
162
|
+
}
|
|
159
163
|
console.log('children', children);
|
|
160
164
|
editor.children = children;
|
|
161
165
|
_slate.Transforms.select(editor, _slate.Editor.end(editor, []));
|