Skip to content

feat: Parsing blocks from external HTML - #414

Closed
matthewlipski wants to merge 1 commit into
custom-block-serializationfrom
paste-from-external
Closed

feat: Parsing blocks from external HTML#414
matthewlipski wants to merge 1 commit into
custom-block-serializationfrom
paste-from-external

Conversation

@matthewlipski

Copy link
Copy Markdown
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

vercelBot commented Nov 17, 2023

Copy link
Copy Markdown

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

NameStatusPreviewUpdated (UTC)
blocknote-website❌ Failed (Inspect)Nov 17, 2023 6:11pm

@matthewlipski
matthewlipski changed the base branch from main to custom-block-serializationNovember 17, 2023 18:11
@YousefED

Copy link
Copy Markdown
Collaborator

superseded by #422

Sign up for freeto 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

@matthewlipski@YousefED