TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
6.46k stars 440 forks source link

Feature: enforce document structure #149

Open howtopick opened 1 year ago

howtopick commented 1 year ago

I try to fix blockContainer+ to heading blockContainer+ in BlockGroup.ts, but it don't work. someone know that?

YousefED commented 1 year ago

@howtopick this is not supported at the moment, we can look into it if more users require this!

wenerme commented 3 months ago

@YousefED Hi, I'd like to override the Doc schema like this https://tiptap.dev/docs/editor/examples/custom-document

I found this https://github.com/TypeCellOS/BlockNote/blob/main/packages/core/src/pm-nodes/Doc.ts

I hope I can change the schema to heading blockGroup

sb8244 commented 2 months ago

I'll put my vote on this as well. I'd love to unify my title bar into the editor to be more like Notion

deanthing commented 1 month ago

Would love this feature.

We should be able to enforce document schema. eg: All documents should start with an h1.