BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Code block language can be changed even when editable is false

Open ysds opened this issue 3 months ago • 1 comments

Describe the bug When syntax highlighting is enabled for code blocks, users can still change the language via the language selector dropdown, even when the editor's editable property is set to false.

Expected Behavior: The language selector should be disabled or non-interactive when editable is false.

Actual Behavior: The language selector remains interactive and allows users to change the language selection.

To Reproduce

https://stackblitz.com/edit/github-rm5p7nzp?file=src%2FApp.tsx

  • enable codeBlock syntax highlighting
  • <BlockNoteView editor={editor} editable={false} />

Misc

  • Node version:
  • Package manager:
  • Browser:
  • [ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖

ysds avatar Nov 05 '25 01:11 ysds