One handy way of adding a link is by copying a link url and pasting it into a text selection. This has been in use as a way of adding links in WordPress for quite some time.
If there isn’t a text selection, or the copied item is not a link we should see default paste behavior.
Changes in this PR implement the idea in Discourse as discussed in Idea: Paste links in the editor - ux - Discourse Meta
- No regressions for paste behavior in d-editor
- Verify that the new qunit tests make sense. In order to fully test paste events, we may need to switch these to integration tests, but let me know if folks have preferences.