Make WordPress Core

Opened 2 years ago

Last modified 17 months ago

#19992 new enhancement

Auto-fill URL field on Insert/edit link popup

Reported by: tillkruess Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.3.1
Component: Editor Keywords: has-patch
Focuses: Cc:


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)

19992.patch (2.8 KB) - added by tillkruess 2 years ago.

Download all attachments as: .zip

Change History (12)

comment:2 nacin2 years ago

Sounds good to me.

comment:3 DrewAPicture2 years ago

  • Cc xoodrew@… added

tillkruess2 years ago

comment:4 tillkruess2 years 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:5 sabreuse2 years ago

  • Cc sabreuse@… added

comment:6 SergeyBiryukov2 years ago

  • Keywords has-patch added

comment:7 tillkruess2 years ago

  • Version changed from 3.3.1 to 3.4

comment:8 DrewAPicture2 years 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 ryansatterfield17 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 someone there is a patch :).

Version 0, edited 17 months ago by ryansatterfield (next)

comment:10 tillkruess17 months ago

The script catches not only email addresses, it also handles HTTP and FTP URLs.

comment:11 ryansatterfield17 months ago

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.

Note: See TracTickets for help on using tickets.