➕(frontend) add @blocknote/code-block
To reduce the bundles size, the highlight syntax library is not included in blocknote core anymore. We need to add a separate dependency in order to have the code block syntax highlight feature.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ag-media/react-pdf-table": "2.0.2",
|
||||
"@blocknote/code-block": "0.29.1",
|
||||
"@blocknote/core": "0.29.1",
|
||||
"@blocknote/mantine": "0.29.1",
|
||||
"@blocknote/react": "0.29.1",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { codeBlock } from '@blocknote/code-block';
|
||||
import {
|
||||
BlockNoteSchema,
|
||||
defaultBlockSpecs,
|
||||
@@ -61,6 +62,7 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
|
||||
|
||||
const editor = useCreateBlockNote(
|
||||
{
|
||||
codeBlock,
|
||||
collaboration: {
|
||||
provider,
|
||||
fragment: provider.document.getXmlFragment('document-store'),
|
||||
|
||||
Reference in New Issue
Block a user