Opened 16 months ago
Last modified 6 months ago
#19992 new enhancement
Auto-fill URL field on Insert/edit link popup
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Editor | Version: | 3.3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | xoodrew@…, sabreuse@… |
Description
I'd like to see the following behavior: When I select a plain URL or email address in the editor and click on "Insert/edit link" the URL field is already populated with either the URL or with a "mailto:<email-address>". Any thoughts? I'd more than happy to write a patch.
Attachments (1)
Change History (12)
comment:1
SergeyBiryukov — 16 months ago
comment:3
DrewAPicture — 16 months ago
- Cc xoodrew@… added
tillkruess — 15 months ago
comment:4
tillkruess — 15 months ago
The regular expressions used in the attached patch where taken from jquery.validate.js. Not sure if there are better ones out there or maybe even already in WP?
comment:6
SergeyBiryukov — 14 months ago
- Keywords has-patch added
comment:7
tillkruess — 13 months ago
- Version changed from 3.3.1 to 3.4
comment:8
DrewAPicture — 13 months ago
- Version changed from 3.4 to 3.3.1
The version field is used to track when an issue was first reported.
comment:9
ryansatterfield — 6 months ago
Why does the patch include ftp on line 290? I was going to submit a ticket for mailto: support since I just had a client complain about not being able to link to their email address and only to their site. I am glad there is a patch :).
comment:10
tillkruess — 6 months ago
The script catches not only email addresses, it also handles HTTP and FTP URLs.
Cool. I am always for keeping WordPress as simple as possible and not confusing end-users. Do you agree that it would be easier for most users just to have http, https and mailto? How many people need to link to FTP? If you know about FTP, you probably can add it into the HTML.

Related: #18149