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
However, before I continue, @bantic maybe you can tell me what the best way to proceed would be. My thinking would be to exclude any selection outside of the editor. So when a selection includes a node after the editor, limit the selection to the last node in the editor. And if a selection includes a node from before the editor, limit the selection to the first node in the editor.
This will however, prevent from selecting anything outside of the editor. Alternatively, one could "split" the selection in two. Have the editor part handled by mobiledoc-kit and leave the other part as it is. I'm not sure how feasible that is so I'd like to have your input.
The text was updated successfully, but these errors were encountered:
@YoranBrondsema Thanks for raising. I am inclined to think that when the editor is disabled, it shouldn't pay any attention to the selection — this error could be fixed by disabling the selection-detection code altogether when editing is disabled.
Do you have a use case for wanting to still have the editor react to text selection even when editing is disabled?
When the editing mode is disabled, adding a selection outside of the editor (for example by triple clicking) throws an error.
I started a PR with a failing test: #394.
However, before I continue, @bantic maybe you can tell me what the best way to proceed would be. My thinking would be to exclude any selection outside of the editor. So when a selection includes a node after the editor, limit the selection to the last node in the editor. And if a selection includes a node from before the editor, limit the selection to the first node in the editor.
This will however, prevent from selecting anything outside of the editor. Alternatively, one could "split" the selection in two. Have the editor part handled by mobiledoc-kit and leave the other part as it is. I'm not sure how feasible that is so I'd like to have your input.
The text was updated successfully, but these errors were encountered: