@seafile/sdoc-editor 3.0.5 → 3.0.7
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.
|
@@ -87,6 +87,7 @@ var SdocEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
87
87
|
|
|
88
88
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
89
|
}, []);
|
|
90
|
+
|
|
90
91
|
// useMount: init socket connection
|
|
91
92
|
(0, _react.useEffect)(function () {
|
|
92
93
|
if (propsEditor) return;
|
|
@@ -265,6 +266,7 @@ var SdocEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
265
266
|
}, /*#__PURE__*/_react["default"].createElement(_readonlyArticle["default"], {
|
|
266
267
|
editor: validEditor,
|
|
267
268
|
slateValue: slateValue,
|
|
269
|
+
updateSlateValue: onValueChange,
|
|
268
270
|
showComment: false
|
|
269
271
|
}))));
|
|
270
272
|
}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
cursor: default;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.sdoc-select.group-select .
|
|
34
|
+
.sdoc-select.group-select .sdoc-font-down {
|
|
35
35
|
display: inline-block;
|
|
36
36
|
color: #999;
|
|
37
37
|
transform: translateY(2px);
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
font-size: 14px !important;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.sdoc-select.group-select .
|
|
42
|
+
.sdoc-select.group-select .sdoc-font-down:hover {
|
|
43
43
|
color: #666;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -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": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
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": "4845375f84b560e5d17d186f98c545d0582ce59e"
|
|
75
75
|
}
|