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
Copy file name to clipboardExpand all lines: docs/content/docs/features/export/email.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,7 @@ See the [full example](/examples/interoperability/converting-blocks-to-react-ema
56
56
-**footer**: Add content to the bottom of the email (must be a React-Email compatible component)
57
57
-**head**: Inject elements into the [Head element](https://react.email/docs/components/head)
58
58
-**container**: Customize the container element (A component which will wrap the email content including the header and footer)
59
+
-**bodyStyles**: Customize the body styles (a `CSSProperties` object), providing an object here will completely override the default styles with what you provide
59
60
60
61
Example usage:
61
62
@@ -82,6 +83,14 @@ const html = await exporter.toReactEmailDocument(editor.document, {
82
83
footer: <Text>Footer</Text>,
83
84
head: <title>My email</title>,
84
85
container: ({ children }) => <Container>{children}</Container>,
86
+
// These are the default body styles that are set by default
Copy file name to clipboardExpand all lines: docs/content/docs/features/extensions.mdx
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ BlockNote includes an extensions system which lets you expand the editor's behav
14
14
15
15
## Creating an extension
16
16
17
-
An extension is an instance of the [`BlockNoteExtension`](https://github.com/TypeCellOS/BlockNote/blob/10cdbfb5f77ef82f3617c0fa1191e0bf5b7358c5/packages/core/src/editor/BlockNoteExtension.ts#L13) class. However, it's recommended for most use cases to create extensions using the `createBlockNoteExtension` function, rather than instanciating the class directly:
17
+
You can create extensions using the `createExtension` function:
18
18
19
19
```typescript
20
-
typeBlockNoteExtensionOptions= {
20
+
typeExtension= {
21
21
key:string;
22
22
keyboardShortcuts?:Record<
23
23
string,
@@ -35,18 +35,16 @@ type BlockNoteExtensionOptions = {
Let's go over the options that can be passed into `createBlockNoteExtension`:
47
+
Let's go over the options that can be passed into `createExtension`:
50
48
51
49
`key:` The name of the extension.
52
50
@@ -68,20 +66,20 @@ Extensions can be added to the editor on their own via the [editor options](/doc
68
66
69
67
### Adding directly to the editor
70
68
71
-
The `extensions`[editor option](/docs/reference/editor/overview#options) takes an array of `BlockNoteExtension`s to be added to the editor:
69
+
The `extensions`[editor option](/docs/reference/editor/overview#options) takes an array of extensions to be added to the editor:
72
70
73
71
```typescript
74
72
const editor =useCreateBlockNote({
75
73
extensions: [
76
74
// Add extensions here:
77
-
createBlockNoteExtension({ ... })
75
+
createExtension({ ... })
78
76
],
79
77
});
80
78
```
81
79
82
80
### Adding to custom blocks
83
81
84
-
When creating a [custom block](/docs/features/custom-schemas/custom-blocks#creating-a-custom-block-type) using `createReactBlockSpec`, you can pass an array of `BlockNoteExtension`s to the third parameter:
82
+
When creating a [custom block](/docs/features/custom-schemas/custom-blocks#creating-a-custom-block-type) using `createReactBlockSpec`, you can pass an array of extensions to the third parameter:
0 commit comments