Skip to content

Code block language can be changed even when editable is false #2156

Closed

Description

@ysds

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 💖

Activity

  1. nperez0111 commented on Nov 5, 2025

    @nperez0111
    Contributor

    Hm, while we are here. We should create a plugin which disables any edits to the document while editable is false (maybe unless some meta is present on the transaction)

  2. added a commit that references this issue on Jan 14, 2026
    f218c3b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions