Skip to content

Commit 016ff1c

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/fix-codeblock-input-rule
2 parents ec7918e + a77c887 commit 016ff1c

454 files changed

Lines changed: 15041 additions & 2328 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
## 0.50.0 (2026-05-04)
2+
3+
### 🚀 Features
4+
5+
- Dark mode styling for file block wrapper component (BLO-866) ([#2680](https://github.com/TypeCellOS/BlockNote/pull/2680))
6+
- Drag hendle menu delete button removes all other blocks in selection (BLO-1007) ([#2683](https://github.com/TypeCellOS/BlockNote/pull/2683))
7+
- Enter moves selection to cell below in tables (BLO-1006) ([#2685](https://github.com/TypeCellOS/BlockNote/pull/2685))
8+
- additional heading top padding (BLO-1008) ([#2690](https://github.com/TypeCellOS/BlockNote/pull/2690))
9+
- Code mark input rule edge case (BLO-938) ([#2698](https://github.com/TypeCellOS/BlockNote/pull/2698))
10+
- **mantine:** upgrade @mantine/core and @mantine/hooks to v9.0.2 ([#2655](https://github.com/TypeCellOS/BlockNote/pull/2655))
11+
12+
### 🩹 Fixes
13+
14+
- Hardcoded strings in comment components (BLO-1033) ([#2681](https://github.com/TypeCellOS/BlockNote/pull/2681))
15+
- Color naming & CSS (BLO-946) ([#2684](https://github.com/TypeCellOS/BlockNote/pull/2684))
16+
- link HTML attributes (BLO-915) ([#2687](https://github.com/TypeCellOS/BlockNote/pull/2687))
17+
- guard hideMenuIfNotFrozen against undefined view state ([#2694](https://github.com/TypeCellOS/BlockNote/pull/2694), [#2699](https://github.com/TypeCellOS/BlockNote/pull/2699))
18+
- Clicking comment overlapping link opens link (BLO-1091) ([#2696](https://github.com/TypeCellOS/BlockNote/pull/2696))
19+
- prevent table row drag from moving an extra adjacent row ([#2703](https://github.com/TypeCellOS/BlockNote/pull/2703))
20+
- **clipboard:** use ProseMirror selection state for Shadow DOM compatibility ([#2677](https://github.com/TypeCellOS/BlockNote/pull/2677))
21+
22+
### ❤️ Thank You
23+
24+
- jt_fox @LimChaeJune
25+
- Matthew Lipski @matthewlipski
26+
- Nick Perez
27+
- Wieland Lindenthal
28+
- Yousef
29+
130
## 0.49.0 (2026-04-24)
231

332
### 🚀 Features

docs/content/docs/features/import/markdown.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ imageTitle: Markdown Import
1515

1616
BlockNote can import Markdown content into Block objects. Note that this is considered "lossy", as not all Markdown structures can be entirely represented as BlockNote blocks.
1717

18+
<Callout type={"warning"}>
19+
**BlockNote ships a minimal Markdown parser.** It covers the common subset used by most users (CommonMark + GFM basics: headings, paragraphs, lists, task lists, tables, code, blockquotes, links, images, emphasis, strikethrough, hard breaks).
20+
21+
There are many Markdown specifications (CommonMark, GFM, MDX, Pandoc, and various dialect-specific extensions) and supporting all of them inside a rich text editor is not a goal of BlockNote. **If you need to handle Markdown beyond this minimal subset, parse it to HTML yourself with a parser of your choice (e.g. [`marked`](https://github.com/markedjs/marked), [`markdown-it`](https://github.com/markdown-it/markdown-it), or [`remark`](https://github.com/remarkjs/remark)) and pass the resulting HTML to [`tryParseHTMLToBlocks`](/docs/features/import) instead.** BlockNote's HTML interoperability is much broader, since HTML is the format the editor uses internally for arbitrary pastes.
22+
</Callout>
23+
1824
## Markdown to Blocks
1925

2026
Use `tryParseMarkdownToBlocks` to try parsing a Markdown string into `Block` objects:

docs/content/docs/foundations/supported-formats.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,20 @@ export default function App() {
165165

166166
BlockNote also supports converting to and from Markdown. However, converting to and from Markdown is a **lossy** conversion.
167167

168+
<Callout type="warning">
169+
BlockNote ships a **minimal** Markdown parser/serializer that targets the
170+
common CommonMark + GFM subset (headings, paragraphs, lists, task lists,
171+
tables, code, blockquotes, links, images, emphasis, strikethrough, hard
172+
breaks). Supporting every Markdown dialect (CommonMark, GFM, MDX, Pandoc,
173+
and various extensions) is not a goal for the editor. If your use case
174+
requires Markdown features beyond this subset, **parse the Markdown to
175+
HTML yourself** (with a library like [`marked`](https://github.com/markedjs/marked),
176+
[`markdown-it`](https://github.com/markdown-it/markdown-it), or
177+
[`remark`](https://github.com/remarkjs/remark)) and feed the resulting
178+
HTML to `editor.tryParseHTMLToBlocks` — HTML is the format BlockNote uses
179+
for arbitrary pastes and has much broader interoperability.
180+
</Callout>
181+
168182
### Saving as Markdown
169183

170184
To convert the document to a Markdown string, you can use `editor.blocksToMarkdownLossy()`:

docs/content/docs/react/components/suggestion-menus.mdx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,70 @@ Passing `slashMenu={false}` to `BlockNoteView` tells BlockNote not to show the d
5858

5959
`getItems` should return the items that need to be shown in the Slash Menu, based on a `query` entered by the user (anything the user types after the `triggerCharacter`). In this case, we simply append the "Hello World" item to the default Slash Menu items, and use `filterSuggestionItems` to filter the full list of items based on the user query.
6060

61+
### Item Grouping & Ordering
62+
63+
Slash Menu items are rendered in the same order as the items returned from `getItems`. Adjacent items which share the same `group` attribute are rendered together in the same group under a single label.
64+
65+
#### Ordering
66+
67+
Items appear in the menu in the exact order of the array. Reordering the array reorders the menu:
68+
69+
```typescript
70+
getItems={async (query) =>
71+
filterSuggestionItems(
72+
[
73+
insertHelloWorldItem(editor), // Shown first
74+
...getDefaultReactSlashMenuItems(editor), // Shown after
75+
],
76+
query,
77+
)
78+
}
79+
```
80+
81+
#### Grouping
82+
83+
Items with the same `group` attribute must be **adjacent** in the array to be rendered as one group. If items with the same `group` are separated by items with a different `group`, they will be rendered as two separate groups, each with their own label:
84+
85+
```typescript
86+
// Renders as a single "Basic" group:
87+
[
88+
{ title: "Item A", group: "Basic", /* ... */ },
89+
{ title: "Item B", group: "Basic", /* ... */ },
90+
{ title: "Item C", group: "Other", /* ... */ },
91+
]
92+
93+
// Renders as two separate "Basic" groups, with "Other" between them:
94+
[
95+
{ title: "Item A", group: "Basic", /* ... */ },
96+
{ title: "Item C", group: "Other", /* ... */ },
97+
{ title: "Item B", group: "Basic", /* ... */ },
98+
]
99+
```
100+
101+
#### Finding, Inserting, Removing & Reordering Items
102+
103+
Use regular array operations to manipulate items. For example, to insert a custom item directly after the default `Heading 1` item:
104+
105+
```typescript
106+
const items = getDefaultReactSlashMenuItems(editor);
107+
const headingIndex = items.findIndex((item) => item.title === "Heading 1");
108+
items.splice(headingIndex + 1, 0, insertHelloWorldItem(editor));
109+
```
110+
111+
To remove an item:
112+
113+
```typescript
114+
const items = getDefaultReactSlashMenuItems(editor).filter(
115+
(item) => item.title !== "Heading 1",
116+
);
117+
```
118+
119+
To reorder items, sort or rearrange the array however you'd like before returning it from `getItems`.
120+
121+
The demo below combines these techniques to render only the "Basic blocks" and "Headings" groups, with their order swapped:
122+
123+
<Example name="ui-components/suggestion-menus-grouping-ordering" />
124+
61125
### Replacing the Slash Menu Component
62126

63127
You can replace the React component used for the Slash Menu with your own, as you can see in the demo below.

docs/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@
3939
"@liveblocks/react-blocknote": "^3.17.0",
4040
"@liveblocks/react-tiptap": "^3.17.0",
4141
"@liveblocks/react-ui": "^3.17.0",
42-
"@mantine/core": "^8.3.11",
43-
"@mantine/hooks": "^8.3.11",
44-
"@mantine/utils": "^6.0.22",
42+
"@mantine/core": "^9.0.2",
43+
"@mantine/hooks": "^9.0.2",
4544
"@marsidev/react-turnstile": "^1.4.2",
4645
"@mui/icons-material": "^5.16.1",
4746
"@mui/material": "^5.16.1",

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/react": "latest",
1818
"@blocknote/shadcn": "latest",
19-
"@mantine/core": "^8.3.11",
20-
"@mantine/hooks": "^8.3.11",
21-
"@mantine/utils": "^6.0.22",
19+
"@mantine/core": "^9.0.2",
20+
"@mantine/hooks": "^9.0.2",
2221
"react": "^19.2.3",
2322
"react-dom": "^19.2.3"
2423
},

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/react": "latest",
1818
"@blocknote/shadcn": "latest",
19-
"@mantine/core": "^8.3.11",
20-
"@mantine/hooks": "^8.3.11",
21-
"@mantine/utils": "^6.0.22",
19+
"@mantine/core": "^9.0.2",
20+
"@mantine/hooks": "^9.0.2",
2221
"react": "^19.2.3",
2322
"react-dom": "^19.2.3"
2423
},

examples/01-basic/03-multi-column/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/react": "latest",
1818
"@blocknote/shadcn": "latest",
19-
"@mantine/core": "^8.3.11",
20-
"@mantine/hooks": "^8.3.11",
21-
"@mantine/utils": "^6.0.22",
19+
"@mantine/core": "^9.0.2",
20+
"@mantine/hooks": "^9.0.2",
2221
"react": "^19.2.3",
2322
"react-dom": "^19.2.3",
2423
"@blocknote/xl-multi-column": "latest"

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/react": "latest",
1818
"@blocknote/shadcn": "latest",
19-
"@mantine/core": "^8.3.11",
20-
"@mantine/hooks": "^8.3.11",
21-
"@mantine/utils": "^6.0.22",
19+
"@mantine/core": "^9.0.2",
20+
"@mantine/hooks": "^9.0.2",
2221
"react": "^19.2.3",
2322
"react-dom": "^19.2.3"
2423
},

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/react": "latest",
1818
"@blocknote/shadcn": "latest",
19-
"@mantine/core": "^8.3.11",
20-
"@mantine/hooks": "^8.3.11",
21-
"@mantine/utils": "^6.0.22",
19+
"@mantine/core": "^9.0.2",
20+
"@mantine/hooks": "^9.0.2",
2221
"react": "^19.2.3",
2322
"react-dom": "^19.2.3"
2423
},

0 commit comments

Comments
 (0)