Skip to content

Commit 4b9d5d0

Browse files
committed
chore: minor changes
1 parent b4b56a9 commit 4b9d5d0

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,4 @@
140140
"y-partykit": "^0.0.33",
141141
"yjs": "^13.6.27"
142142
}
143-
}
143+
}

examples/01-basic/01-minimal/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"@blocknote/ariakit": "latest",
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/shadcn": "latest",
18-
"@blocknote/code-block": "latest",
1918
"react": "^19.1.0",
2019
"react-dom": "^19.1.0"
2120
},
@@ -25,4 +24,4 @@
2524
"@vitejs/plugin-react": "^4.3.1",
2625
"vite": "^5.3.4"
2726
}
28-
}
27+
}

packages/core/src/blocks/PageBreak/block.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const createPageBreakBlockSpec = createBlockSpec(
5151
);
5252

5353
/**
54-
* Adds multi-column support to the given schema.
54+
* Adds page break support to the given schema.
5555
*/
5656
export const withPageBreak = <
5757
B extends BlockSchema,

playground/src/examples.gen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@
903903
"pathFromRoot": "examples/04-theming",
904904
"slug": "theming"
905905
},
906-
"readme": "To enable code block syntax highlighting, you can use the `codeBlock` option in the `useCreateBlockNote` hook. This is excluded by default to reduce bundle size.\n\n**Relevant Docs:**\n\n- [Code Block Syntax Highlighting](/docs/features/blocks/code-blocks)\n- [Editor Setup](/docs/getting-started/editor-setup)"
906+
"readme": "To enable code block syntax highlighting, you can extend the editor's default schema with a new `codeBlock`, which you can pass options into when creating. By passing the default options from `@blocknote/code-block`, you can enable syntax highlighting. This is excluded by default to reduce bundle size.\n\n**Relevant Docs:**\n\n- [Code Block Syntax Highlighting](/docs/features/blocks/code-blocks)\n- [Editor Setup](/docs/getting-started/editor-setup)\n- [Custom Schema](/docs/features/custom-schemas)"
907907
},
908908
{
909909
"projectSlug": "custom-code-block",
@@ -930,7 +930,7 @@
930930
"pathFromRoot": "examples/04-theming",
931931
"slug": "theming"
932932
},
933-
"readme": "To configure a code block highlighting theme and language, you can use the `codeBlock` option in the `useCreateBlockNote` hook.\n\nThis allows you to configure a shiki highlighter for the code blocks of your editor, allowing you to tailor the themes and languages you would like to use.\n\nTo create a syntax highlighter, you can use the [shiki-codegen](https://shiki.style/packages/codegen) CLI for generating the code to create a syntax highlighter for your languages and themes.\n\nFor example to create a syntax highlighter using the optimized javascript engine, javascript, typescript, vue, with light and dark themes, you can run the following command:\n\n```bash\nnpx shiki-codegen --langs javascript,typescript,vue --themes light,dark --engine javascript --precompiled ./shiki.bundle.ts\n```\n\nThis will generate a `shiki.bundle.ts` file that you can use to create a syntax highlighter for your editor.\n\nLike this:\n\n```ts\nimport { createHighlighter } from \"./shiki.bundle\";\n\nexport default function App() {\n // Creates a new editor instance.\n const editor = useCreateBlockNote({\n codeBlock: {\n indentLineWithTab: true,\n defaultLanguage: \"typescript\",\n supportedLanguages: {\n typescript: {\n name: \"TypeScript\",\n aliases: [\"ts\"],\n },\n },\n createHighlighter: () =>\n createHighlighter({\n themes: [\"light-plus\", \"dark-plus\"],\n langs: [],\n }),\n },\n });\n\n return <BlockNoteView editor={editor} />;\n}\n```\n\n**Relevant Docs:**\n\n- [Code Blocks](/docs/features/blocks/code-blocks)\n- [shiki-codegen](https://shiki.style/packages/codegen)"
933+
"readme": "To configure a code block highlighting theme and language, you can extend the editor's default schema with a new `codeBlock`, which you can pass options into when creating. You can then use a shiki highlighter to add custom syntax highlighting.\n\nFirst use the [shiki-codegen](https://shiki.style/packages/codegen) CLI to create a `shiki.bundle.ts` file. You can then pass this file into the `codeBlock` options when creating it.\n\n**Relevant Docs:**\n\n- [Code Blocks](/docs/features/blocks/code-blocks)\n- [shiki-codegen](https://shiki.style/packages/codegen)\n- [Custom Schema](/docs/features/custom-schemas)"
934934
}
935935
]
936936
},

pnpm-lock.yaml

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)