Highlighted selection - not to lose focus when focusing on other element on the page #4963
Unanswered
demiro
asked this question in
Questions & Help
Replies: 1 comment
-
I'm interested in this as well. I have a similar use case, how I want to solve it for now is that I apply a mark extension (like highlight) to the selection and I make sure to remove it when I'm done with these other steps. But I'm not very happy with this approach because it has a lot of pitfalls, like preserving these marks to the db, not removing them correctly, etc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know it sounds a bit confusing...
but inherently the selection get lost when you focus on another element
imagine this scenario:
user selects some text
clicks on a chatbot window and ask the bot something related to the selection
obviously as soon as you click into checkbox window, the editor's selection gets lost.... but, is it possible to wrap the whole selection in a special ..., and when I select something else, it gets unwrapped?
I saw some other editors do it, not sure how would I go about it in tiptap? Is there an extension or command that would do that?
Beta Was this translation helpful? Give feedback.
All reactions