Skip to content

Commit abf6acb

Browse files
committed
docs: a layout block is not left out of the HTML export
The text for `toExternalHTML` said that a component that renders nothing leaves the block out of the exported HTML. That is not true for a layout block: the export of a React layout block is then an empty element. The text now states this exception.
1 parent 7f3b872 commit abf6acb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎docs/content/docs/features/custom-schemas/custom-blocks.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ type ReactCustomBlockImplementation = {
188188

189189
`renderFrame?:` A component that draws a frame around the block's content and its child blocks. See [Block Frames](#block-frames).
190190

191-
`toExternalHTML?:` This component is used whenever the block is being exported to HTML for use outside BlockNote, for example when copying it to the clipboard. If it's not defined, BlockNote will just use `render` (and `renderFrame`, if the block has one) for the HTML conversion. If the component renders nothing (`null`), the block is left out of the exported HTML. Takes the same props as `render`, and two more:
191+
`toExternalHTML?:` This component is used whenever the block is being exported to HTML for use outside BlockNote, for example when copying it to the clipboard. If it's not defined, BlockNote will just use `render` (and `renderFrame`, if the block has one) for the HTML conversion. If the component renders nothing (`null`), the block is left out of the exported HTML. A [layout block](/docs/features/custom-schemas/layout-blocks) is an exception: it is not left out, and exports as an empty element. Takes the same props as `render`, and two more:
192192

193193
- `childrenRef:` A React `ref` that marks where the block's child blocks go, for example inside a `<details>` element. Without it, the child blocks follow the block.
194194

0 commit comments

Comments
 (0)