I want to insert a link in contentEditable
with document.execCommand
. The link is inserted by a user via a modal window. How to preserve and than restore the selection after the user confirms insertion?
There are a couple of answered questions, but they seem to be outdated.