@seafile/sdoc-editor 3.0.262 → 3.0.263
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.
|
@@ -515,6 +515,8 @@ function renderImageBlock(props, editor) {
|
|
|
515
515
|
var align = element.align;
|
|
516
516
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
517
517
|
var isSelected = (0, _slateReact.useSelected)();
|
|
518
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
519
|
+
var readOnly = (0, _slateReact.useReadOnly)();
|
|
518
520
|
var justifyContent = '';
|
|
519
521
|
if (align) {
|
|
520
522
|
justifyContent = align === 'left' ? 'start' : align === 'right' ? 'end' : align;
|
|
@@ -529,7 +531,7 @@ function renderImageBlock(props, editor) {
|
|
|
529
531
|
onMouseOver: function onMouseOver(e) {
|
|
530
532
|
return (0, _helpers.selectImageWhenSelectPartial)(e, editor, element, isSelected);
|
|
531
533
|
},
|
|
532
|
-
contentEditable:
|
|
534
|
+
contentEditable: !readOnly,
|
|
533
535
|
suppressContentEditableWarning: true
|
|
534
536
|
}), children);
|
|
535
537
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.263",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "2856bc842753ede907c64dca27fbb5e68d40d2f8"
|
|
74
74
|
}
|