Skip to content

Commit 16870be

Browse files
committed
Merge branch 'refs/heads/main' into releases
2 parents 5680752 + 72c3678 commit 16870be

File tree

69 files changed

+2689
-3581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2689
-3581
lines changed

CONTRIBUTING.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
Directory structure:
44

55
```
6-
blocknote
7-
├── packages/core - The core of the editor
8-
├── packages/react - The main library for use in React apps
9-
├── examples/editor - Example React app that embeds the editor
10-
├── examples/vanilla - An advanced example if you don't want to use React or want to build your own UI components
11-
└── tests - Playwright end to end tests
6+
BlockNote
7+
├── packages/core - The core of the editor, which includes all logic to get the editor running in vanilla JS.
8+
├── packages/react - A React wrapper and UI for the editor. Requires additional components for the UI.
9+
├── packages/ariakit - UI components for the `react` package, made with Ariakit.
10+
├── packages/mantine - UI components for the `react` package, made with Mantine.
11+
├── packages/shadcn - UI components for the `react` package, made with Shadcn.
12+
├── packages/server-util - Utilities for converting BlockNote documents into static HTML for server-side rendering.
13+
├── packages/dev-scripts - A set of tools for converting example editor setups into components for the BlockNote website.
14+
├── examples - Example editor setups used for demos in the BlockNote website and playground.
15+
├── docs - Code for the BlockNote website.
16+
├── playground - A basic page where you can quickly test each of the example editor setups.
17+
└── tests - Playwright end to end tests.
1218
```
1319

1420
An introduction into the BlockNote Prosemirror schema can be found in [packages/core/src/pm-nodes/README.md](https://github.com/TypeCellOS/BlockNote/blob/main/packages/core/src/pm-nodes/README.md).
@@ -29,3 +35,14 @@ To run the project, open the command line in the project's root directory and en
2935
- Add the dependency to the relevant `package.json` file (packages/xxx/package.json)
3036
- run `npm run install-new-packages`
3137
- Double check `package-lock.json` to make sure only the relevant packages have been affected
38+
39+
## Packages:
40+
41+
| Package | Size | Version |
42+
|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
43+
| [@blocknote/core](https://github.com/TypeCellOS/BlockNote/tree/main/packages/core) | <a href="https://bundlephobia.com/result?p=@blocknote/core@latest"><img src="https://img.shields.io/bundlephobia/minzip/@blocknote/core?color=%238ab4f8&label=gzip%20size"></a> | <a href="https://www.npmjs.com/package/@blocknote/core"><img src="https://img.shields.io/npm/v/@blocknote/core.svg?color=%23c1a8e2"></a> |
44+
| [@blocknote/react](https://github.com/TypeCellOS/BlockNote/tree/main/packages/react) | <a href="https://bundlephobia.com/result?p=@blocknote/react@latest"><img src="https://img.shields.io/bundlephobia/minzip/@blocknote/react?color=%238ab4f8&label=gzip%20size"></a> | <a href="https://www.npmjs.com/package/@blocknote/react"><img src="https://img.shields.io/npm/v/@blocknote/react?color=%23c1a8e2"></a> |
45+
| [@blocknote/ariakit](https://github.com/TypeCellOS/BlockNote/tree/main/packages/ariakit) | <a href="https://bundlephobia.com/result?p=@blocknote/ariakit@latest"><img src="https://img.shields.io/bundlephobia/minzip/@blocknote/ariakit?color=%238ab4f8&label=gzip%20size"></a> | <a href="https://www.npmjs.com/package/@blocknote/ariakit"><img src="https://img.shields.io/npm/v/@blocknote/ariakit?color=%23c1a8e2"></a> |
46+
| [@blocknote/mantine](https://github.com/TypeCellOS/BlockNote/tree/main/packages/mantine) | <a href="https://bundlephobia.com/result?p=@blocknote/mantine@latest"><img src="https://img.shields.io/bundlephobia/minzip/@blocknote/mantine?color=%238ab4f8&label=gzip%20size"></a> | <a href="https://www.npmjs.com/package/@blocknote/mantine"><img src="https://img.shields.io/npm/v/@blocknote/mantine?color=%23c1a8e2"></a> |
47+
| [@blocknote/shadcn](https://github.com/TypeCellOS/BlockNote/tree/main/packages/shadcn) | <a href="https://bundlephobia.com/result?p=@blocknote/shadcn@latest"><img src="https://img.shields.io/bundlephobia/minzip/@blocknote/shadcn?color=%238ab4f8&label=gzip%20size"></a> | <a href="https://www.npmjs.com/package/@blocknote/shadcn"><img src="https://img.shields.io/npm/v/@blocknote/shadcn?color=%23c1a8e2"></a> |
48+
| [@blocknote/server-util](https://github.com/TypeCellOS/BlockNote/tree/main/packages/server-util) | <a href="https://bundlephobia.com/result?p=@blocknote/server-util@latest"><img src="https://img.shields.io/bundlephobia/minzip/@blocknote/server-util?color=%238ab4f8&label=gzip%20size"></a> | <a href="https://www.npmjs.com/package/@blocknote/server-util"><img src="https://img.shields.io/npm/v/@blocknote/server-util?color=%23c1a8e2"></a> |

docs/pages/docs/custom-schemas.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@ type MyPartialBlock = typeof schema.PartialBlock;
9696

9797
### Automatically override all default types (experimental)
9898

99-
Alternatively, the easiest way to get full type safety without any additional work is to override all default types with your custom schema, by using a custom type definition file. See this [example blocknote.d.ts](https://github.com/TypeCellOS/BlockNote/blob/main/examples/05-custom-schema/react-custom-styles/blocknote.d.ts.example). This is an experimental feature - we would love to hear your feedback on this approach.
99+
Alternatively, the easiest way to get full type safety without any additional work is to override all default types with your custom schema, by using a custom type definition file. See this [example blocknote.d.ts](https://github.com/TypeCellOS/BlockNote/blob/main/examples/06-custom-schema/react-custom-styles/blocknote.d.ts.example). This is an experimental feature - we would love to hear your feedback on this approach.

docs/pages/docs/editor-basics/setup.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The hook takes two optional parameters:
5858
The `useCreateBlockNote` hook is actually a simple `useMemo` wrapper around
5959
the `BlockNoteEditor.create` method. You can use this method directly if you
6060
want to control the editor lifecycle manually. For example, we do this in
61-
the [Saving & Loading example](/examples/basic/saving-loading) to delay the
61+
the [Saving & Loading example](/examples/backend/saving-loading) to delay the
6262
editor creation until some content has been fetched from an external data
6363
source.
6464
</p>

docs/pages/docs/ui-components/side-menu.mdx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,3 @@ You can also change the items in the Drag Handle Menu. The demo below adds an it
4646
<Example name="ui-components/side-menu-drag-handle-items" />
4747

4848
Here, we use the `SideMenu` component but keep the default buttons (we don't pass any children). Instead, we pass our customized Drag Handle Menu using the `dragHandleMenu` prop.
49-
50-
<div className="nx-mt-6 nx-leading-7 first:nx-mt-0">
51-
<small>
52-
<strong>Tip:</strong> The children you pass to the `DragHandleMenu` component
53-
should be default items (e.g. `RemoveBlockItem`) or custom items
54-
(`DragHandleMenuItem`). To see all the components you can use, head to the
55-
[Drag Handle Menu's source code](link).
56-
</small>
57-
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"devDependencies": {
2323
"@types/react": "^18.0.25",
2424
"@types/react-dom": "^18.0.9",
25-
"@vitejs/plugin-react": "^4.0.4",
25+
"@vitejs/plugin-react": "^4.3.1",
2626
"eslint": "^8.10.0",
27-
"vite": "^4.4.8"
27+
"vite": "^5.3.4"
2828
},
2929
"eslintConfig": {
3030
"extends": [

examples/01-basic/02-block-objects/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"devDependencies": {
2323
"@types/react": "^18.0.25",
2424
"@types/react-dom": "^18.0.9",
25-
"@vitejs/plugin-react": "^4.0.4",
25+
"@vitejs/plugin-react": "^4.3.1",
2626
"eslint": "^8.10.0",
27-
"vite": "^4.4.8"
27+
"vite": "^5.3.4"
2828
},
2929
"eslintConfig": {
3030
"extends": [

examples/01-basic/03-all-blocks/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"devDependencies": {
2323
"@types/react": "^18.0.25",
2424
"@types/react-dom": "^18.0.9",
25-
"@vitejs/plugin-react": "^4.0.4",
25+
"@vitejs/plugin-react": "^4.3.1",
2626
"eslint": "^8.10.0",
27-
"vite": "^4.4.8"
27+
"vite": "^5.3.4"
2828
},
2929
"eslintConfig": {
3030
"extends": [

examples/01-basic/04-removing-default-blocks/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"devDependencies": {
2323
"@types/react": "^18.0.25",
2424
"@types/react-dom": "^18.0.9",
25-
"@vitejs/plugin-react": "^4.0.4",
25+
"@vitejs/plugin-react": "^4.3.1",
2626
"eslint": "^8.10.0",
27-
"vite": "^4.4.8"
27+
"vite": "^5.3.4"
2828
},
2929
"eslintConfig": {
3030
"extends": [

examples/01-basic/05-block-manipulation/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"devDependencies": {
2323
"@types/react": "^18.0.25",
2424
"@types/react-dom": "^18.0.9",
25-
"@vitejs/plugin-react": "^4.0.4",
25+
"@vitejs/plugin-react": "^4.3.1",
2626
"eslint": "^8.10.0",
27-
"vite": "^4.4.8"
27+
"vite": "^5.3.4"
2828
},
2929
"eslintConfig": {
3030
"extends": [

examples/01-basic/06-selection-blocks/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"devDependencies": {
2323
"@types/react": "^18.0.25",
2424
"@types/react-dom": "^18.0.9",
25-
"@vitejs/plugin-react": "^4.0.4",
25+
"@vitejs/plugin-react": "^4.3.1",
2626
"eslint": "^8.10.0",
27-
"vite": "^4.4.8"
27+
"vite": "^5.3.4"
2828
},
2929
"eslintConfig": {
3030
"extends": [

0 commit comments

Comments
 (0)