Skip to content

Commit 894801c

Browse files
committed
add blockoverrides docs
1 parent 790b0b7 commit 894801c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
The `NotionRenderer` component offers a few properties
1515

1616
- [`blockMap`](#blockMap) – required
17+
- [`blockOverrides`](#blockOverrides) – default: `{}`
1718
- [`contentId`](#contentId) – default: `undefined`
1819
- [`embedAllow`](#embedAllow) – default: `"fullscreen"`
1920
- [`fullPage`](#fullPage) – default: `false`
@@ -32,6 +33,19 @@ The `NotionRenderer` component offers a few properties
3233
– the blocks part of a Notion API response.
3334
A list of blocks by their id that may contain contents and properties.
3435

36+
### `blockOverrides`: Object
37+
38+
– the Notion blocks that should be overriden by custom registered Vue components.
39+
A key-value pair Object of Notion block names to Vue component names.
40+
41+
e.g. to use a custom `code` component—after registering the `CustomCode` Vue component—add the following override, as seen in the `/example`
42+
43+
```js
44+
blockOverrides: {
45+
code: "CustomCode",
46+
}
47+
```
48+
3549
### `contentId`: String
3650

3751
– the id of the block that should be rendered.

0 commit comments

Comments
 (0)