Files
siyuan/kernel/conf
Jiacheng 5b84279673 🎨 Support auto-convert pasted URL to clickable link format (#17338)
* feat: auto-convert pasted URL to clickable link format (#17337)

Agent-Logs-Url: https://github.com/bytemain/siyuan/sessions/cdea999d-27c0-4260-a0b4-519e011e6667

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>

* fix: use angle bracket URL syntax for markdown link safety

Agent-Logs-Url: https://github.com/bytemain/siyuan/sessions/cdea999d-27c0-4260-a0b4-519e011e6667

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>

* feat: add pasteURLAutoConvert editor setting to control URL auto-linking

Agent-Logs-Url: https://github.com/bytemain/siyuan/sessions/1b722c05-e69f-4964-89bb-7f928d5adeb3

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>

* refactor: reuse setInlineMark for paste URL auto-convert, matching Ctrl+K link handler pattern

Agent-Logs-Url: https://github.com/bytemain/siyuan/sessions/332d1b44-cebe-45b2-833e-72d7e3253a3d

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>

* refactor: extract shared resolveLinkDest and genLinkText utility functions

Agent-Logs-Url: https://github.com/bytemain/siyuan/sessions/316f674d-3ce9-4b40-8711-08edb8af1aec

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>

* Disable automatic URL conversion on paste

* feat: add stripScheme option to genLinkText - keep scheme for paste, strip for Ctrl+K

Agent-Logs-Url: https://github.com/bytemain/siyuan/sessions/960eaf33-f873-4709-8e63-8d9b473de4ee

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>

* Improve link handling in paste function

Refactor link handling in paste function to update range after setting inline mark.

* Fix return statement in paste.ts

* style: fix json tag alignment in Editor struct

* Update app/src/mobile/settings/editor.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(Link): handle URI decoding more safely in genLinkText

Add try-catch block to prevent URI decoding errors and make decoding optional

* feat(editor): add auto URL to link conversion on paste

Implement automatic conversion of pasted URLs to clickable links when the pasteURLAutoConvert setting is enabled. This improves user experience by eliminating the manual step of creating links for pasted URLs. The functionality is extracted into a separate function for better code organization and reuse.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-29 22:40:42 +08:00
..
2024-09-04 09:40:50 +08:00
2024-06-12 21:03:51 +08:00
2026-02-11 20:29:46 +08:00