Prevent image clicking if not in editing mode

This commit is contained in:
Oliver Walters 2026-05-27 06:45:57 +00:00
parent bf675f1d85
commit b4bd68853a
2 changed files with 16 additions and 1 deletions

View File

@ -66,3 +66,17 @@
.ProseMirror.resize-cursor {
cursor: col-resize;
}
/* Disable image interaction when not in editing mode */
.mantine-RichTextEditor-root:not([data-editing]) .ProseMirror img {
pointer-events: none;
user-select: none;
}
.mantine-RichTextEditor-root:not([data-editing]) .node-image.ProseMirror-selectednode .image-component {
outline: none;
}
.mantine-RichTextEditor-root:not([data-editing]) .node-image.ProseMirror-selectednode .image-resizer {
display: none;
}

View File

@ -470,6 +470,7 @@ export default function NotesEditor({
variant='subtle'
editor={editor}
style={{ minHeight: '400px' }}
data-editing={isEditing || undefined}
>
{canEdit && isEditing && (
<RichTextEditor.Toolbar sticky>
@ -631,7 +632,7 @@ export default function NotesEditor({
</Paper>
</Stack>
</Box>
<Paper p='xs' shadow='sm' withBorder style={{ width: '200px' }}>
<Paper p='xs' shadow='sm' withBorder style={{ minWidth: '200px' }}>
<Stack gap='xs'>
{canEdit && (
<Button