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 we have the "split" concept that means splitting a node into two pieces, with the opposite being merge.
But we also use splitting sometimes inside other commands, when we want to ensure that we are at the edge of a node. For example, before inserting a block from a fragment, we need to make sure the cursor is collapsed, and if it's in the middle of an existing block, we need to split that block in half. But if it's already at the end of an existing block, we don't need to do anything.
I think it might be useful to have another concept called "slice" (or maybe something better?) that only splits nodes when it has to. And if it's already at a node's edge, it does nothing.
We don't want to use split for this, because split maps nicely to the user's expectations of the enter key, where even at the edges of a block it'll still split them.
The text was updated successfully, but these errors were encountered:
I believe that this may be fixed by #3093, which has changed a lot of the logic in Slate and slate-react especially. I'm going to close this out, but as always, feel free to open a new issue if it persists for you. Thanks for understanding.
Do you want to request a feature or report a bug?
Idea.
What's the current behavior?
Right now we have the "split" concept that means splitting a node into two pieces, with the opposite being merge.
But we also use splitting sometimes inside other commands, when we want to ensure that we are at the edge of a node. For example, before inserting a block from a fragment, we need to make sure the cursor is collapsed, and if it's in the middle of an existing block, we need to split that block in half. But if it's already at the end of an existing block, we don't need to do anything.
I think it might be useful to have another concept called "slice" (or maybe something better?) that only splits nodes when it has to. And if it's already at a node's edge, it does nothing.
We don't want to use split for this, because split maps nicely to the user's expectations of the enter key, where even at the edges of a block it'll still split them.
The text was updated successfully, but these errors were encountered: