Bug 146576

Summary: Use clipboard content when inserting a hyperlink
Product: LibreOffice Reporter: andreas_k <kainz.a>
Component: LibreOfficeAssignee: Andreas Heinisch <andreas.heinisch>
Status: RESOLVED FIXED    
Severity: normal CC: heiko.tietze, kainz.a
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=158345
https://bugs.documentfoundation.org/show_bug.cgi?id=159138
Whiteboard: target:24.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112125    

Description andreas_k 2022-01-04 23:19:02 UTC
In Typora a markdown editor you can select a text and add a hyperlink with strg + k. Which is the same than in LibreOffice, but in Typora the content from the clipboard was automatically used for the hyperlink. So you don't have to go to past the content from the clipboard to the hyperlink dialog.

This is a tiny change, but it's a really good idea to fasten your workflow.

how it should work:
1. select an url with strg + c
2. select a text
3. insert hyperlink strg + k
4. Url field should be by default pasted the hyperlink
   - maybe it can be defined that auto past was done only if it's an url (www, http, mailto, ...)
   - Url field will be selected, so with del you can remove the auto past content
5. click enter and the hyperlink was done.
Comment 1 Heiko Tietze 2022-01-05 06:54:25 UTC
Sounds like a good idea.
Comment 2 Commit Notification 2023-07-27 07:02:17 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/89d3735e05b98223a49a387421386fd736fc3de6

tdf#146576 - Propose clipboard content when inserting a hyperlink

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Andreas Heinisch 2023-07-27 07:05:38 UTC
There is still room for improvement here for a follow-up report, e.g., when the clipboard contains a mail address, or a document link, the dialog could automatically prefill the corresponding fields.