@seafile/sdoc-editor 2.0.197 → 2.0.199
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.
|
@@ -49,6 +49,21 @@
|
|
|
49
49
|
font-size: calc(100vw / 794 * 14.7) !important;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
.sdoc-editor-container.fullscreen a,
|
|
53
|
+
.sdoc-editor-container.fullscreen .sdoc-drag-cover,
|
|
54
|
+
.sdoc-editor-container.fullscreen .sdoc-file-link-render,
|
|
55
|
+
.sdoc-editor-container.fullscreen .sdoc-file-render {
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.sdoc-editor-container.fullscreen a {
|
|
60
|
+
color: #212529;
|
|
61
|
+
font-weight: 500;
|
|
62
|
+
text-decoration: underline;
|
|
63
|
+
text-underline-position: under;
|
|
64
|
+
text-decoration-color: rgb(55 53 47 / 25%);
|
|
65
|
+
}
|
|
66
|
+
|
|
52
67
|
.sdoc-editor-container {
|
|
53
68
|
flex: 1;
|
|
54
69
|
display: flex;
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
height: 100%;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
.sdoc-file-preview-drawer a {
|
|
7
|
+
color: #212529;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
text-decoration: underline;
|
|
10
|
+
text-underline-position: under;
|
|
11
|
+
text-decoration-color: rgb(55 53 47 / 25%);
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
.sdoc-file-preview-drawer .file-preview-panel-wrapper {
|
|
7
15
|
/* 100vh - toolbar height*/
|
|
8
16
|
height: calc(100vh - 93px);
|
|
@@ -66,7 +74,7 @@
|
|
|
66
74
|
text-overflow: ellipsis;
|
|
67
75
|
}
|
|
68
76
|
|
|
69
|
-
.sdoc-file-preview-drawer .file-preview-panel-header .file-preview-panel-header-left .
|
|
77
|
+
.sdoc-file-preview-drawer .file-preview-panel-header .file-preview-panel-header-left .title {
|
|
70
78
|
color: #212529;
|
|
71
79
|
font-size: 16px;
|
|
72
80
|
font-weight: 500;
|
|
@@ -330,7 +330,7 @@ var Image = function Image(_ref) {
|
|
|
330
330
|
"data-parent-id": parentImageBlockId,
|
|
331
331
|
className: (0, _classnames["default"])('sdoc-image-wrapper', className)
|
|
332
332
|
}, attributes, {
|
|
333
|
-
contentEditable: canEditable,
|
|
333
|
+
contentEditable: !readOnly && canEditable,
|
|
334
334
|
suppressContentEditableWarning: true,
|
|
335
335
|
style: (0, _objectSpread2["default"])({}, style),
|
|
336
336
|
onMouseOver: function onMouseOver(e) {
|
|
@@ -347,7 +347,7 @@ var Image = function Image(_ref) {
|
|
|
347
347
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
348
348
|
ref: imageRef,
|
|
349
349
|
className: (0, _classnames["default"])({
|
|
350
|
-
'image-selected': isSelected
|
|
350
|
+
'image-selected': !readOnly && isSelected
|
|
351
351
|
}),
|
|
352
352
|
onClick: onClickImage,
|
|
353
353
|
src: (0, _helpers.getImageURL)(data, editor),
|
|
@@ -361,7 +361,7 @@ var Image = function Image(_ref) {
|
|
|
361
361
|
}), isUploadError && /*#__PURE__*/_react["default"].createElement(_imageLoader["default"], {
|
|
362
362
|
copyright: t('Image_is_upload_error'),
|
|
363
363
|
isError: true
|
|
364
|
-
}), isSelected && /*#__PURE__*/_react["default"].createElement("span", {
|
|
364
|
+
}), !readOnly && isSelected && /*#__PURE__*/_react["default"].createElement("span", {
|
|
365
365
|
className: "image-resizer",
|
|
366
366
|
ref: resizerRef,
|
|
367
367
|
onMouseDown: onResizeStart
|
|
@@ -23,9 +23,10 @@ var withQuickInsert = function withQuickInsert(editor) {
|
|
|
23
23
|
newEditor.isSlashKey = false;
|
|
24
24
|
newEditor.insertText = function (text) {
|
|
25
25
|
if (!editor.selection) return insertText(text);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
// select multiple top block, top block entry is null
|
|
27
|
+
var topBlockEntry = (0, _core.getTopLevelBlockNode)(editor);
|
|
28
|
+
if (!topBlockEntry) return insertText(text);
|
|
29
|
+
var blockNode = topBlockEntry[0];
|
|
29
30
|
|
|
30
31
|
// Disable quick insert for code block and table
|
|
31
32
|
if ([_constants2.CODE_BLOCK, _constants2.TABLE].includes(blockNode.type)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.199",
|
|
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": "184c82bdcd396bff847eb24750da75aea47ebade"
|
|
75
75
|
}
|