-
Notifications
You must be signed in to change notification settings - Fork 122
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
Allow to insert before first node if it is an isolated node. #1200
Comments
I think the most natural solution would be to add a fake-text element (e.g. paragraph) before the IN (sth that exists only in the view not in the model). Then the user can navigate there with the cursor. Once they start typing we actually create the paragraph in the model. Not sure how the inverse should look like, when the user wants to get rid of that text before the IN again. Probably it's ok to leave the paragraph there until removed with cmd+backspace. We could also react once this first paragraph becomes empty and delete it from the model (and again leave it in the view). |
This is unfortunately very inconsistent with respect to the selection, which is visible to the model. |
We already have a flag on NodeSelection: 'before' |
And if we just prevent that from ever happening. I mean if we disable insertion of isolated nodes as first element in a container? |
I didn't like the custom cursor style we had before... somewhat unnatural. But if we managed to do it with a native blinking cursor I think it would be fine. |
There are a bunch of ways how to run into this situation. Particularly if it comes to collab at some time. |
I am not saying that we bring that cursor in general. Just for this case. |
You could go even further and render some more complex element in the top of the IN when sel.type is 'node' and sel.mode is 'before' |
Understand. Mhh.. native cursor also not possible if we would be ok that it's rendered at a lower height (like a text cursor) at the top-left of the IN? |
I see two alternatives (assuming that we have the mentioned special node selection) :
Then the question how to 'activate' this type of selection: maybe the user could press UP on the first IN. (but then there would be no other clue before) |
A totally different approach: allow for 'shifting' nodes via keyboard shortcut and drag. |
At the moment, it is impossible to get before the first node and to insert a node there.
The text was updated successfully, but these errors were encountered: