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
Or to remove some prebuilt components like the `<AlignmentButtons>`:
52
52
53
53
```jsx
54
54
import {
55
-
RichTextInput,
56
-
RichTextInputToolbar,
57
-
LevelSelect,
58
-
FormatButtons,
59
-
ListButtons,
60
-
LinkButtons,
61
-
QuoteButtons,
62
-
ClearButtons,
55
+
RichTextInput,
56
+
RichTextInputToolbar,
57
+
LevelSelect,
58
+
FormatButtons,
59
+
ListButtons,
60
+
LinkButtons,
61
+
QuoteButtons,
62
+
ClearButtons,
63
63
} from'ra-input-rich-text';
64
64
65
65
constMyRichTextInput= ({ size, ...props }) => (
66
-
<RichTextInput
67
-
toolbar={
68
-
<RichTextInputToolbar>
69
-
<LevelSelect size={size} />
70
-
<FormatButtons size={size} />
71
-
<ListButtons size={size} />
72
-
<LinkButtons size={size} />
73
-
<QuoteButtons size={size} />
74
-
<ClearButtons size={size} />
75
-
</RichTextInputToolbar>
76
-
}
77
-
label="Body"
78
-
source="body"
79
-
{...props}
80
-
/>
66
+
<RichTextInput
67
+
toolbar={
68
+
<RichTextInputToolbar>
69
+
<LevelSelect size={size} />
70
+
<FormatButtons size={size} />
71
+
<ListButtons size={size} />
72
+
<LinkButtons size={size} />
73
+
<QuoteButtons size={size} />
74
+
<ClearButtons size={size} />
75
+
</RichTextInputToolbar>
76
+
}
77
+
label="Body"
78
+
source="body"
79
+
{...props}
80
+
/>
81
81
);
82
82
```
83
83
84
84
## Customizing the editor
85
85
86
-
You might want to add more Tiptap extensions. The `<RichTextInput>` component accepts an `editorOptions` prop which is the [object passed to Tiptap Editor](https://www.tiptap.dev/guide/configuration).
86
+
You might want to add more TipTap extensions. The `<RichTextInput>` component accepts an `editorOptions` prop, which is the [object passed to the TipTap Editor](https://www.tiptap.dev/guide/configuration).
87
87
88
88
If you just want to **add** extensions, don't forget to include those needed by default for our implementation. Here's an example to add the [HorizontalRule node](https://www.tiptap.dev/api/nodes/horizontal-rule):
0 commit comments