Skip to content

Commit 8179f73

Browse files
committed
Merge remote-tracking branch 'origin/main' into releases
2 parents 54716a4 + 8cb5829 commit 8179f73

File tree

387 files changed

+11693
-3254
lines changed

Some content is hidden

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

387 files changed

+11693
-3254
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
},
2525
},
2626
},
27+
ignorePatterns: ["**/ui/*"],
2728
rules: {
2829
curly: 1,
2930
"import/no-extraneous-dependencies": [

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ assignees: ''
1111
<what's going wrong!?>
1212

1313
**To Reproduce**
14-
<links to a sandbox or clear steps to reproduce are super helpful!>
14+
<clear steps to reproduce are super helpful! Best is to provide an online sandbox, [click to create one](https://stackblitz.com/github/TypeCellOS/BlockNote/tree/main/examples/01-basic/01-minimal?file=App.tsx)>
1515

1616
**Misc**
1717
- Node version:

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ A clear and concise description of any alternative solutions or features you've
1818

1919
**Additional context**
2020
Add any other context or screenshots about the feature request here.
21+
22+
**Bonus**
23+
[ ] I'm a [sponsor](https://github.com/sponsors/YousefED) and would appreciate if you could look into this sooner than later 💖

docs/components/pages/landing/hero/DemoEditor.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { uploadToTmpFilesDotOrg_DEV_ONLY } from "@blocknote/core";
22
import "@blocknote/core/fonts/inter.css";
3-
import { BlockNoteView, useCreateBlockNote } from "@blocknote/react";
4-
import "@blocknote/react/style.css";
3+
import { useCreateBlockNote } from "@blocknote/react";
4+
import { BlockNoteView } from "@blocknote/mantine";
5+
import "@blocknote/mantine/style.css";
56
import { useCallback, useMemo, useState } from "react";
67
import YPartyKitProvider from "y-partykit/provider";
78
import * as Y from "yjs";

docs/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"dependencies": {
1212
"@blocknote/core": "^0.12.4",
1313
"@blocknote/react": "^0.12.4",
14+
"@blocknote/ariakit": "^0.12.4",
15+
"@blocknote/mantine": "^0.12.4",
16+
"@blocknote/shadcn": "^0.12.4",
1417
"@headlessui/react": "^1.7.18",
1518
"@mantine/core": "^7.7.1",
1619
"@next/bundle-analyzer": "^14.1.0",

docs/pages/docs/advanced/ariakit.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: BlockNote with Ariakit
3+
description: Ariakit rich text editor with BlockNote
4+
imageTitle: BlockNote with Ariakit
5+
---
6+
7+
import { Example } from "@/components/example";
8+
import { Callout } from "nextra/components";
9+
10+
## Using Ariakit with BlockNote
11+
12+
[Ariakit](https://ariakit.org/) is an open-source library of unstyled (headless), primitive components with a focus on Accessibility. To use BlockNote with Ariakit, you can import `BlockNoteView` from `@blocknote/ariakit` (instead of from `@blocknote/mantine`).
13+
14+
You can fully style the components with your own CSS, or import the provided default styles using the CSS file from `@blocknote/ariakit/style.css`.
15+
16+
<Example name="basic/ariakit" />

docs/pages/docs/advanced/nextjs.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: Next.js and BlockNote
33
description: Details on integrating BlockNote with Next.js
44
imageTitle: Next.js and BlockNote
5-
path: /docs/nextjs
65
---
76

87
# Next.js and BlockNote

docs/pages/docs/advanced/real-time-collaboration.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: Real-time Collaborative rich text editor
33
description: Let's see how you can add Multiplayer capabilities to your BlockNote setup, and allow real-time collaboration between users (similar to Google Docs)
44
imageTitle: Real-time Collaboration
5-
path: /docs/real-time-collaboration
65
---
76

87
# Real-time Collaboration (multiplayer text editor)

docs/pages/docs/advanced/shadcn.mdx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: BlockNote with ShadCN and Tailwind
3+
description: ShadCN + Tailwind rich text editor using BlockNote
4+
imageTitle: BlockNote with ShadCN and Tailwind
5+
---
6+
7+
import { Example } from "@/components/example";
8+
import { Callout } from "nextra/components";
9+
10+
## Using ShadCN, Radix and Tailwind with BlockNote
11+
12+
[shadcn/ui](https://ui.shadcn.com/) is an open-source collection of React components based on [Radix](https://radix-ui.com/) and Tailwind. To use BlockNote with shadcn, you can import `BlockNoteView` from `@blocknote/shadcn` (instead of from `@blocknote/mantine`) and the stylesheet from `@blocknote/shadcn/style.css`.
13+
14+
<Example name="basic/shadcn" />
15+
16+
## ShadCN Customization
17+
18+
BlockNote comes with default shadcn components. However, it's likely that you have copied and possibly customized your own shadcn components in your project.
19+
To make BlockNote use the ShadCN components from your project instead of the default ones, you can pass them using the `shadCNComponents` prop of `BlockNoteView`:
20+
21+
```tsx
22+
import * as Button from "@/components/ui/button"
23+
import * as Select from "@/components/ui/select"
24+
25+
return (
26+
<BlockNoteView editor={editor} shadCNComponents={{
27+
Select,
28+
Button,
29+
...
30+
}} />
31+
);
32+
```
33+
34+
You can pass components from the following ShadCN modules:
35+
36+
- Badge
37+
- Button
38+
- Card
39+
- DropdownMenu
40+
- Form
41+
- Input
42+
- Label
43+
- Popover
44+
- Select
45+
- Tabs
46+
- Toggle
47+
- Tooltip
48+
49+
<Callout type="warning" emoji="⚠️">
50+
To ensure compatibility, your ShadCN components should not use Portals
51+
(comment these out from your DropdownMenu, Popover and Select components).
52+
</Callout>

docs/pages/docs/advanced/vanilla-js.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: Usage Without React (Vanilla JS)
33
description: BlockNote is mainly designed as a quick and easy drop-in block-based editor for React apps, but can also be used in vanilla JavaScript apps.
44
imageTitle: Usage Without React (Vanilla JS)
5-
path: /docs/vanilla-js
65
---
76

87
import { Callout } from "nextra/components";

0 commit comments

Comments
 (0)