[SOLUTIONS] Link as you type [SOLUTIONS] #6122
Unanswered
alexbran8
asked this question in
Questions & Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Affected Packages
extension/link
Version(s)
2.5.6
Issue Description
I would like to implement a feature that marks a link in real time as typing. Currently, even with
autoLink
set totrue
in the link-extension, the link is only marked after pressing space.One solution I found is to check the latest node in the editor's
onUpdate
event. If a URL is detected, apply the link mark through a transaction.However, making changes to the link afterward does not work correctly. As described in this post, the solution requires iterating over the entire document state and reviewing all link marks to ensure consistency.
Would you recommend a better approach for achieving this behaviour?
Browser(s) Used
Chrome / Safari / Firefox
Expected Behaviour
The link mark should be applied as I type, rather than only after finishing a word and pressing space.
Beta Was this translation helpful? Give feedback.
All reactions