Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here are a few tweaks for your perusal. Feel free to bring in what you think is appropriate in whatever way you feel is appropriate!
4a95e51
Focus the editor when link dialog is closed.
This is especially useful when the ESC key is hit. Without this, the link dialog disappears, you expect to be able to continue editing, but the editor does not have focus. Now it does!
fc4e989
Update addLink behavior to handle editing link without a full selection.
When your cursor is within a node of linked text and the link dialog is opened, the intention is almost always to edit the link for the full node rather than insert a new link in place of the text for which the cursor is sitting.
Here's how this interaction worked before:
https://share.cleanshot.com/1NYHrBxP
With this change, editing a link when the cursor is within a linked node will edit the link for the entire linked text rather than replacing or inserting the new link in place of or in the midst of the linked node text.
Here is the change in action:
https://share.cleanshot.com/gLjDmjwN
f7ad92b
Show invalid URL message when link validity is broken.
Prior to this the text field would turn red, but the "Not a valid URL" message did not appear to the user.