Skip to content

Commit ac38a1b

Browse files
docs: add disclaimer (#2034)
1 parent 1b2e86b commit ac38a1b

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

docs/content/docs/getting-started/shadcn.mdx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,31 @@ To use BlockNote with ShadCN, you can import `BlockNoteView` from `@blocknote/sh
2525
To ensure Tailwind generates the necessary CSS for all utility classes used by BlockNote components, make sure to add the `@source` directive to your stylesheet that imports Tailwind:
2626

2727
```css
28-
@import tailwindcss;
28+
@import "tailwindcss";
2929
...
3030
/* Path to your installed `@blocknote/shadcn` package. */
3131
@source "../node_modules/@blocknote/shadcn";
3232
```
3333

34+
{/* TODO: Figure out why `@source` directive isn't working in StackBlitz sandbox. */}
35+
{/* https://stackblitz.com/edit/github-xdutga97?file=src%2FApp.tsx */}
36+
37+
<Callout type={"warning"}>
38+
Because the ShadCN version of BlockNote requires being in a Tailwind app,
39+
viewing the demo below on StackBlitz will have missing styles.
40+
</Callout>
41+
3442
<Example name="basic/shadcn" />
3543

3644
## Usage with Tailwind Only
3745

38-
If your app doesn't use ShadCN components and only uses TailwindCSS, you just need to extend your Tailwind theme with ShadCN utility classes to get ecerything working. You can do this by simply copying the styles below into your stylesheet that imports Tailwind.
46+
If your app doesn't use ShadCN components and only uses TailwindCSS, you just need to extend your Tailwind theme with ShadCN utility classes to get everything working. You can do this by simply copying the styles below into your stylesheet that imports Tailwind.
3947

4048
```css
41-
@import tailwindcss;
49+
@import "tailwindcss";
50+
...
51+
/* Path to your installed `@blocknote/shadcn` package. */
52+
@source "../node_modules/@blocknote/shadcn";
4253
...
4354
@custom-variant dark (&:is(.dark *));
4455

examples/01-basic/09-shadcn/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
This example shows how you can use BlockNote with ShadCN (instead of Mantine).
44

5+
<Callout type={"warning"}>
6+
Because the ShadCN version of BlockNote requires being in a Tailwind app,
7+
viewing the demo below on StackBlitz will have missing styles.
8+
</Callout>
9+
510
**Relevant Docs:**
611

712
- [Getting Started with ShadCN](/docs/getting-started/shadcn)

playground/src/examples.gen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
"pathFromRoot": "examples/01-basic",
187187
"slug": "basic"
188188
},
189-
"readme": "This example shows how you can use BlockNote with ShadCN (instead of Mantine).\n\n**Relevant Docs:**\n\n- [Getting Started with ShadCN](/docs/getting-started/shadcn)"
189+
"readme": "This example shows how you can use BlockNote with ShadCN (instead of Mantine).\n\n<Callout type={\"warning\"}>\nBecause the ShadCN version of BlockNote requires being in a Tailwind app,\nviewing the demo below on StackBlitz will have missing styles.\n</Callout>\n\n**Relevant Docs:**\n\n- [Getting Started with ShadCN](/docs/getting-started/shadcn)"
190190
},
191191
{
192192
"projectSlug": "localization",

0 commit comments

Comments
 (0)