@seafile/sdoc-editor 2.0.34-alph-0.0.2 → 2.0.34-alph-0.0.5
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,10 +87,8 @@ class TableContextMenu extends _react.default.Component {
|
|
|
87
87
|
this.colorSelectorRef = /*#__PURE__*/_react.default.createRef();
|
|
88
88
|
}
|
|
89
89
|
componentDidMount() {
|
|
90
|
-
const {
|
|
91
|
-
|
|
92
|
-
} = this.props;
|
|
93
|
-
if (readonly) return;
|
|
90
|
+
// const { readonly, editor } = this.props;
|
|
91
|
+
// if (readonly && editor.editorType === WIKI_EDITOR) return;
|
|
94
92
|
this.position = this.props.contextMenuPosition;
|
|
95
93
|
this.updateMenuPosition();
|
|
96
94
|
}
|
|
@@ -125,7 +123,6 @@ class TableContextMenu extends _react.default.Component {
|
|
|
125
123
|
t,
|
|
126
124
|
readonly
|
|
127
125
|
} = this.props;
|
|
128
|
-
// if (readonly) return;
|
|
129
126
|
const currentTable = (0, _core.getSelectedNodeByType)(editor, _constants.ELEMENT_TYPE.TABLE);
|
|
130
127
|
if (!currentTable) return null;
|
|
131
128
|
const currentRow = (0, _core.getSelectedNodeByType)(editor, _constants.ELEMENT_TYPE.TABLE_ROW);
|
|
@@ -51,7 +51,7 @@ const TableRoot = _ref => {
|
|
|
51
51
|
ref: tableScrollWrapper,
|
|
52
52
|
onScroll: onScroll,
|
|
53
53
|
onContextMenu: onContextMenu
|
|
54
|
-
}, children)), isShowContextMenu && /*#__PURE__*/_react.default.createElement(_menu.TableContextMenu, {
|
|
54
|
+
}, children)), isShowContextMenu && !readonly && /*#__PURE__*/_react.default.createElement(_menu.TableContextMenu, {
|
|
55
55
|
editor: editor,
|
|
56
56
|
contextMenuPosition: menuPosition,
|
|
57
57
|
readonly: readonly
|