-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Custom Blocks #191
feat: Custom Blocks #191
Conversation
…ustom-formattingtoolbar
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
* Fixed custom block placeholders, formatting toolbar, and sizing * Small styling changes * Made text align button not show up when selected block/s doesn't/don't support the prop * Updated docs * Finished 1st draft custom block docs and demo * Added type arguments in custom block docs & minor changes * Implemented PR feedback
// let complexHTML: string; | ||
// let complexMarkdown: string; | ||
|
||
function removeInlineContentClass(html: string) { | ||
return html.replace(/ class="_inlineContent_1c48ad"/g, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1c48ad is not stable I think? that will change based on the build
@@ -38,7 +38,6 @@ Tippy popups that are appended to document.body directly | |||
.defaultStyles h3, | |||
.defaultStyles li { | |||
all: unset !important; | |||
flex-grow: 1 !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is intended to be removed right? I thought we just added it
* update packages incl prosemirror-view * fix build * fix ReactAlert + add logs
This PR enables users to add Custom Blocks! 🥳
See https://www.blocknotejs.org/docs/block-types#custom-block-types
Besides the API surface, the biggest change was rearchitecting BlockNote for custom schemas without compromising on Type-safety. A BlockNote editor will now have a specific type (using generics) based on the Schema (the blocks registered to it).
Two remaining issues will be picked up separately:
(see also #164)