You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tiptap is headless, which means there is no styling provided. That also means you are in full control of how your editor looks. The following methods allow you to apply custom styles to the editor.
18
18
19
19
<ImageCard.Card>
20
-
<ImageCard.Imagesrc={contentTemplatesImage.src}alt="User interface templates for Tiptap" />
21
-
<ImageCard.Content>
22
-
<ImageCard.Title>Wanna take a shortcut?</ImageCard.Title>
23
-
<ImageCard.Paragraph>Speed up your Tiptap integration into your React app with our UI template. It's ready for deployment as-is or can be customized to your needs.</ImageCard.Paragraph>
@@ -49,6 +52,12 @@ The entire editor is rendered inside a container with the class `.tiptap`. You c
49
52
}
50
53
```
51
54
55
+
<Callouttitle="Style with CSS modules"variant="warning">
56
+
In [CSS modules](https://github.com/css-modules/css-modules), class names are modified to enable
57
+
local scoping, which may prevent styles from applying when targeting the `.tiptap` class. Use
58
+
global styles or the `:global(.tiptap)` modifier to ensure styles are applied correctly.
59
+
</Callout>
60
+
52
61
If you're rendering the stored content elsewhere, there won't be a `.tiptap` container, so you can globally add styling to the relevant HTML tags:
53
62
54
63
```css
@@ -58,8 +67,6 @@ p {
58
67
}
59
68
```
60
69
61
-
**_Note:_** When using CSS modules, class names are modified to enable local scoping, which may prevent styles from applying if targeting the .tiptap class. Use global styles or the :global(.tiptap) modifier in your CSS module to ensure styles are applied correctly.
62
-
63
70
## Add custom classes
64
71
65
72
You can control the whole rendering, including adding classes to everything.
0 commit comments