forgejo/web_src/js
silverwind 4511287676
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)

(cherry picked from commit a3cfe6f39ba33cea305de592a006727857014c53)
2024-03-11 23:36:59 +07:00
..
components Set user's 24h preference from their current OS locale (#29651) 2024-03-11 23:36:59 +07:00
features Support pasting URLs over markdown text (#29566) 2024-03-11 23:36:59 +07:00
markup Fix user-defined markup links targets (#29305) 2024-03-11 23:36:59 +07:00
modules Set user's 24h preference from their current OS locale (#29651) 2024-03-11 23:36:59 +07:00
render
standalone
utils Support pasting URLs over markdown text (#29566) 2024-03-11 23:36:59 +07:00
vendor
webcomponents Fix URL calculation in clone input box (#29470) 2024-03-06 12:10:44 +08:00
bootstrap.js Fix/Improve processWindowErrorEvent (#29407) 2024-03-06 12:10:44 +08:00
bootstrap.test.js
htmx.js
index.js Filter Repositories by type (#29231) 2024-03-06 12:10:46 +08:00
jquery.js
svg.js
svg.test.js
utils.js enforce maxlength in frontend (#29389) 2024-02-26 22:30:27 +01:00
utils.test.js
vitest.setup.js