@seafile/sdoc-editor 3.0.5 → 3.0.7-alpha-0.0.1
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/editor/sdoc-editor.js +2 -0
- package/dist/extension/plugins/file-view/insert-view-dialog/dropdown-select/index.css +2 -2
- package/dist/extension/plugins/sdoc-link/hover-menu/index.js +4 -1
- package/dist/extension/plugins/sdoc-link/render/render-elem.js +1 -0
- package/dist/views/readonly-article.js +3 -1
- package/package.json +4 -5
- package/LICENSE.txt +0 -13
|
@@ -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
|
|
|
@@ -110,7 +110,10 @@ var SdocLinkHoverMenu = function SdocLinkHoverMenu(_ref) {
|
|
|
110
110
|
href: url,
|
|
111
111
|
target: "_blank",
|
|
112
112
|
rel: "noopener noreferrer",
|
|
113
|
-
className: "link-op-menu-link"
|
|
113
|
+
className: "link-op-menu-link",
|
|
114
|
+
onClick: function onClick(e) {
|
|
115
|
+
return e.stopPropagation();
|
|
116
|
+
}
|
|
114
117
|
}, t('Open_link')))), !readOnly && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
115
118
|
className: "op-group-item"
|
|
116
119
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -139,6 +139,7 @@ var SdocFileLink = function SdocFileLink(_ref) {
|
|
|
139
139
|
if (element.type === _elementType.WIKI_LINK) {
|
|
140
140
|
data = element;
|
|
141
141
|
}
|
|
142
|
+
console.log(22, e);
|
|
142
143
|
var eventBus = _eventBus["default"].getInstance();
|
|
143
144
|
eventBus.dispatch(_constants.INTERNAL_EVENT.TRANSFER_PREVIEW_FILE_ID, data);
|
|
144
145
|
setTimeout(function () {
|
|
@@ -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-alpha-0.0.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"description": "",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@seafile/comment-editor": "0.0.14",
|
|
20
|
+
"@seafile/comment-editor": "^0.0.14-alpha-0.0.1",
|
|
21
21
|
"@seafile/print-js": "1.6.6",
|
|
22
|
-
"@seafile/react-image-lightbox": "
|
|
22
|
+
"@seafile/react-image-lightbox": "^5.0.0",
|
|
23
23
|
"@seafile/slate": "0.91.8",
|
|
24
24
|
"@seafile/slate-history": "0.86.2",
|
|
25
25
|
"@seafile/slate-hyperscript": "0.81.7",
|
|
@@ -70,6 +70,5 @@
|
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
|
-
}
|
|
74
|
-
"gitHead": "8629f169a57be83cbaad84b8a413a728d4fd2a22"
|
|
73
|
+
}
|
|
75
74
|
}
|
package/LICENSE.txt
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2025 Seafile Ltd.
|
|
2
|
-
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
See the License for the specific language governing permissions and
|
|
13
|
-
limitations under the License.
|