Skip to content
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

introduce isBlock and isInline queries #2862

Closed
ianstormtaylor opened this issue Jun 7, 2019 · 1 comment
Closed

introduce isBlock and isInline queries #2862

ianstormtaylor opened this issue Jun 7, 2019 · 1 comment

Comments

@ianstormtaylor
Copy link
Owner

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' 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.

@ianstormtaylor
Copy link
Owner Author

Fixed by #3093.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant