Opened 9 months ago
Closed 9 months ago
#57941 closed defect (bug) (invalid)
CTRL+V paste shortcut used for placing a link
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | 2nd-opinion |
Focuses: | Cc: |
Description
In Gutenberg, if you have something selected text and do standard CTRL+V (with text in clipboard), it does not replace selected text as any other windows program in history would do, but it creates a link with the clipboard as the URL address. This goes against all good programming practices.
If i may recommend - i would go to e.g. CTRL+SHIFT+K (as CTRL+K is standard Add link shortcut), or even better - if it is possible to detect the content of the content of the clipboard - the standard CTRL+K might be used in cases, when there is a URL or email address in the clipboard (with adding mailto: for email).
Change History (3)
This ticket was mentioned in Slack in #core-editor by tobifjellner. View the logs.
9 months ago
#3
@
9 months ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
if you have something selected text and do standard CTRL+V (with text in clipboard), it does not replace selected text as any other windows program in history would do, but it creates a link with the clipboard as the URL address
Yes, in the editor (and even in the old editor) pasting "over" any selection will create a link with the selection as the linked text/image. That happens only if the clipboard content is an URL (or something that looks very much like an URL). This is a feature, not a bug :)
As @costdev explained above, this is how many other online editors work, and is an easy, very convenient way to create simple links (no popups, no dialogs, no buttons to click, etc.). This feature has been in the WordPress editors for 5-6 years I think.
Closing as "invalid" as this is the expected behavior. Feel free to reopen if there are good reasons to change this behavior.
Hi @thomask, thanks for opening this ticket.
For URLs/email addresses, the text became a link which linked to the URL/created a
mailto:
link. It's quite common now to create a link on paste. This is done in Slack, GitHub and Edge (by default), to name just three that came to mind at the time of writing.In addition:
needs-patch
and adding2nd-opinion
to gather thoughts on this.trunk
, as this has existed since before WordPress 6.2.