BlockNote
BlockNote copied to clipboard
Code Block missing after changing the default programming language
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