mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-19 21:19:31 +01:00
fix: disable node views in readonly mode
This commit is contained in:
@@ -76,7 +76,9 @@ export class SelectionBasedNodeView<
|
||||
): React.ReactElement<any> | null {
|
||||
if (!this.options.component) return null;
|
||||
const theme = this.editor.storage.theme as Theme;
|
||||
const isSelected = this.insideSelection() || this.nodeInsideSelection();
|
||||
const isSelected =
|
||||
this.editor.isEditable &&
|
||||
(this.insideSelection() || this.nodeInsideSelection());
|
||||
|
||||
return (
|
||||
<ThemeProvider theme={theme}>
|
||||
|
||||
Reference in New Issue
Block a user