]> source.dussan.org Git - gitea.git/commit
Improve textarea paste (#31948)
authorsilverwind <me@silverwind.io>
Sun, 1 Sep 2024 15:15:29 +0000 (17:15 +0200)
committerGitHub <noreply@github.com>
Sun, 1 Sep 2024 15:15:29 +0000 (15:15 +0000)
commit55502265716f000a2c61c98fa093244e1310d97f
tree35b4667dd80a3dd29eadfb8761b49a9463c803fe
parent286ede47ad683bf0431e531e82019cd016cc54dd
Improve textarea paste (#31948)

- When pasting a URL over another URL, replace the URL instead of
creating a useless `[url](url)`. This is the 1-line change
[here](https://github.com/go-gitea/gitea/pull/31948/files#diff-be8e94d7e3da33b187381f53d28095107bd0cf29ae9a9e997e4f422f4a54479cR122).
- Always run `initTextareaEvents`, previously it was not run when
`dropzoneEl` was not present like when attachements are disabled on the
server. Refactored the function to gracefully handle absent `dropzoneEl`
and rename the function to a better name.
web_src/js/features/comp/ComboMarkdownEditor.ts
web_src/js/features/comp/EditorUpload.ts