Skip to content

Conversation

@matthewlipski
Copy link
Collaborator

This PR adds a fromExternalHTML function that can be defined for each block type. The function provides a HTML element and a function to parse InlineContent[] from inside a HTML element, as attributes. The function should return a PartialBlock with the parsed block, or undefined if the element should not be parsed as that block type. Currently, it is the responsibility of the fromExternalHTML function to construct every aspect of the block. This means that content and children must be defined manually as the parser will not fill them. This is probably not the approach we want to go for, for reasons documented in parseExternalHTML.ts.

@vercel
Copy link

vercel bot commented Nov 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote-website ❌ Failed (Inspect) Nov 17, 2023 6:11pm

@matthewlipski matthewlipski changed the base branch from main to custom-block-serialization November 17, 2023 18:11
@YousefED
Copy link
Collaborator

superseded by #422

@YousefED YousefED closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants