BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Code Block missing after changing the default programming language

Open fedenuche opened this issue 1 year ago • 0 comments

I'm trying to change the default programming language in the Code Block from Javascript to Python. So I'm using the customizeCodeBlock function, but when I use that, the block disappears from the slash menu.

import {
  BlockNoteSchema,
  defaultBlockSpecs,
  customizeCodeBlock,
} from '@blocknote/core';

const schema = BlockNoteSchema.create({
  blockSpecs: {
    ...defaultBlockSpecs,
    codeBlock: customizeCodeBlock({
      defaultLanguage: 'python',
    }),
  },
});

Misc

  • Node version: 20.18.0
  • React version: 18.3.1
  • Package manager: npm
  • Browser: Firefox and Chrome

fedenuche avatar Jan 14 '25 18:01 fedenuche