Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/content/docs/reference/editor/paste-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ BlockNote, by default, attempts to paste content in the following order:

You can change the default paste behavior by providing a custom paste handler, which will give you full control over how pasted content is inserted into the editor.

## Word and Google Docs

BlockNote automatically converts Microsoft Word list paragraphs into nested lists,
removes Word paragraph-end placeholders, and preserves blank paragraphs copied from
Google Docs. This applies to external HTML pasted from the clipboard.

This is a best-effort conversion into BlockNote's block types, not exact source
formatting preservation. Unsupported list labels, such as `iv.` or `1.2.`, stay as
text instead of being removed.

To replace this behavior, use a custom `pasteHandler` and handle the HTML before
calling `editor.pasteHTML`. Calling `defaultPasteHandler` keeps the built-in
normalization. Internal BlockNote clipboard content bypasses this normalization.

## `pasteHandler` option

The `pasteHandler` option is a function that receives the following arguments:
Expand Down
Loading
Loading