I'm trying to remove link node when user selects link formatting and leaving popup by clicking outside.
Any ideas how this can be achieved?
After click new selection is present and I have no access to previous so I can't call
editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);