You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now blocks and inlines are defined at the data level, with object: 'block' or object: 'inline'. But based on #2757 this restriction is in question.
What's the expected behavior?
Instead, we can use the same pattern for isVoid and isAtomic. Specifically that schemas can define an isInline: true property for nodes (defaulting to false since blocks are much more common). As well as editor.isInline(node) and editor.isBlock(node) queries.
The block/inline property of nodes would then be controlled at the editor level, and could be changed like in CSS. It no longer needs to be hardcoded in the data model.
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
Improvement / debt.
What's the current behavior?
Right now blocks and inlines are defined at the data level, with
object: 'block'
orobject: 'inline'
. But based on #2757 this restriction is in question.What's the expected behavior?
Instead, we can use the same pattern for
isVoid
andisAtomic
. Specifically that schemas can define anisInline: true
property for nodes (defaulting tofalse
since blocks are much more common). As well aseditor.isInline(node)
andeditor.isBlock(node)
queries.The block/inline property of nodes would then be controlled at the editor level, and could be changed like in CSS. It no longer needs to be hardcoded in the data model.
The text was updated successfully, but these errors were encountered: