You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/web_src/js/features/comp
silverwind a3cfe6f39b
Support pasting URLs over markdown text (#29566)
Support pasting URLs over selection text in the textarea editor. Does
not work in EasyMDE and I don't intend to support it. Image paste works
as usual in both Textarea and EasyMDE.

The new `replaceTextareaSelection` function changes textarea content via
[`insertText`](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#using_inserttext)
command, which preserves history, e.g. `CTRL-Z` works and is also
demostrated below. We should later refactor the image paste code to use
the same function because it currently destroys history.

Overriding the formatting via `Shift` key is supported as well, e.g.
`Ctrl+Shift+V` will insert the URL as-is, like on GitHub.


![urlpaste](https://github.com/go-gitea/gitea/assets/115237/522b1023-6797-401c-9e4a-498570adfc88)
11 months ago
..
ColorPicker.js JS refactors (#22227) 2 years ago
ComboMarkdownEditor.js Support pasting URLs over markdown text (#29566) 11 months ago
ConfirmModal.js Change green buttons to primary color (#27099) 1 year ago
EasyMDEToolbarActions.js Fix EasyMDE toolbar (#24489) 2 years ago
LabelEdit.js Allow to archive labels (#26478) 2 years ago
Paste.js Support pasting URLs over markdown text (#29566) 11 months ago
QuickSubmit.js Remove jQuery from the "quick submit" handler (#29200) 12 months ago
ReactionSelector.js Use fetch helpers instead of fetch (#27026) 1 year ago
SearchUserBox.js Improve user search display name (#29002) 1 year ago
TextExpander.js Update JS dependencies, remove space after emoji completion (#25266) 2 years ago
WebHookEditor.js Remove jQuery from the webhook editor (#29211) 12 months ago