From 10bd8d7c1f7d3587a46e709660fc3f8db22181b5 Mon Sep 17 00:00:00 2001 From: Mohamed Firas <62911996+Fir121@users.noreply.github.com> Date: Sat, 20 Jul 2024 08:39:36 +0400 Subject: [PATCH] fix: disable image delete if in read-only mode (#534) --- src/plugins/image/ImageEditor.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/image/ImageEditor.tsx b/src/plugins/image/ImageEditor.tsx index 5506b784..6a567a86 100644 --- a/src/plugins/image/ImageEditor.tsx +++ b/src/plugins/image/ImageEditor.tsx @@ -276,6 +276,7 @@ export function ImageEditor({ src, title, alt, nodeKey, width, height }: ImageEd className={styles.iconButton} type="button" title={t('image.delete', 'Delete image')} + disabled={readOnly} onClick={(e) => { e.preventDefault() editor.update(() => {