Skip to content

Commit

Permalink
fix: disable image delete if in read-only mode (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fir121 committed Jul 20, 2024
1 parent 4bdb69a commit 10bd8d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/plugins/image/ImageEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 10bd8d7

Please sign in to comment.