@seafile/sdoc-editor 2.0.205 → 2.0.206
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.
|
@@ -84,6 +84,7 @@ var SdocEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
84
84
|
|
|
85
85
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
86
|
}, []);
|
|
87
|
+
|
|
87
88
|
// useMount: init socket connection
|
|
88
89
|
(0, _react.useEffect)(function () {
|
|
89
90
|
if (propsEditor) return;
|
|
@@ -262,6 +263,7 @@ var SdocEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
262
263
|
}, /*#__PURE__*/_react["default"].createElement(_readonlyArticle["default"], {
|
|
263
264
|
editor: validEditor,
|
|
264
265
|
slateValue: slateValue,
|
|
266
|
+
updateSlateValue: onValueChange,
|
|
265
267
|
showComment: false
|
|
266
268
|
}))));
|
|
267
269
|
}
|
|
@@ -16,12 +16,14 @@ var _layout = require("../layout");
|
|
|
16
16
|
var ReadOnlyArticle = function ReadOnlyArticle(_ref) {
|
|
17
17
|
var editor = _ref.editor,
|
|
18
18
|
slateValue = _ref.slateValue,
|
|
19
|
+
updateSlateValue = _ref.updateSlateValue,
|
|
19
20
|
_ref$showComment = _ref.showComment,
|
|
20
21
|
showComment = _ref$showComment === void 0 ? false : _ref$showComment;
|
|
21
22
|
var decorate = (0, _decorates.usePipDecorate)(editor);
|
|
22
23
|
return /*#__PURE__*/_react["default"].createElement(_slateReact.Slate, {
|
|
23
24
|
editor: editor,
|
|
24
|
-
value: slateValue
|
|
25
|
+
value: slateValue,
|
|
26
|
+
onChange: updateSlateValue
|
|
25
27
|
}, /*#__PURE__*/_react["default"].createElement(_layout.ArticleContainer, {
|
|
26
28
|
editor: editor
|
|
27
29
|
}, /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement(_highlight.SetNodeToDecorations, null), /*#__PURE__*/_react["default"].createElement(_slateReact.Editable, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.206",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "4547ca460df8f4b16b570575f65bb9fb3f6c75da"
|
|
75
75
|
}
|