Opened 16 months ago

Last modified 6 months ago

#19992 new enhancement

Auto-fill URL field on Insert/edit link popup

Reported by: tillkruess 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)

19992.patch (2.8 KB) - added by tillkruess 15 months ago.

Download all attachments as: .zip

Change History (12)

Sounds good to me.

  • Cc xoodrew@… added

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?

  • Cc sabreuse@… added
  • Keywords has-patch added
  • Version changed from 3.3.1 to 3.4
  • Version changed from 3.4 to 3.3.1

The version field is used to track when an issue was first reported.

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 :).

Last edited 6 months ago by ryansatterfield (previous) (diff)

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.

Note: See TracTickets for help on using tickets.