-
-
Notifications
You must be signed in to change notification settings - Fork 531
/
Copy pathApp.tsx
30 lines (27 loc) · 962 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { en } from "@blocknote/core/locales";
import "@blocknote/core/fonts/inter.css";
import { BlockNoteView } from "@blocknote/mantine";
import "@blocknote/mantine/style.css";
import { useCreateBlockNote } from "@blocknote/react";
export default function App() {
// We use the English, default dictionary
const locale = en;
// Creates a new editor instance.
const editor = useCreateBlockNote({
// We override the `placeholders` in our dictionary
dictionary: {
...locale,
placeholders: {
...locale.placeholders,
// We override the empty document placeholder
emptyDocument: "Start typing..",
// We override the default placeholder
default: "Custom default placeholder",
// We override the heading placeholder
heading: "Custom heading placeholder",
},
},
});
// Renders the editor instance using a React component.
return <BlockNoteView editor={editor} />;
}