Make WordPress Core

Opened 8 years ago

Closed 5 years ago

#37805 closed enhancement (reported-upstream)

Enhancement: TinyMCE - Add ability to detect www links

Reported by: lunacodes's profile lunacodes Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Editor Keywords:
Focuses: ui Cc:

Description

Currently TinyMCE doesn't detect www links without http:// in front of them.

This means that the workflow for making www.url.com into a link is Select Text -> Press Link Button (or Ctrl+k) -> Type (or copy/paste) text into link dialogue, while the workflow for an http:// is simply Link Button (or Ctrl+k) -> Enter.

Since www is still pretty common for canonical urls, it seems like it would be useful to include detection of www links in TinyMCE, and avoid the extra step, and improve this workflow. This would especially benefit more basic users (who may not realize they can c/p and Ctrl+k in the first place) by making the WordPress experience friendlier and faster for them.

Change History (5)

#1 @iseulde
8 years ago

  • Keywords reporter-feedback added

Thanks for the report and welcome to Trac!

I have some trouble understanding the problem. When I want to link with a URL, prefixed with http://, I can use ctrl+K or the button, paste the link in the input field, and press enter. That seems to be the same for a URL that is not prefixed with http://? The only difference I see is that we don't link when you paste a URL, that is not prefixed with http://, directly over a word without opening the link toolbar. Is this what you mean?

#2 @lunacodes
8 years ago

Hi - thanks for the welcome, and sorry if my initial post was unclear. Essentially what I'm getting at is this:

If I've already got a link inside of TinyMCE, say for example http://www.url.com and I select the text and hit Ctrl+k , the input field that pops up will automatically fill in http://www.url.com and I can press Enter and move on with my life.

If, instead I have www.url.com without the http:// and I press Ctrl+k, then the input field won't fill in anything at all. My suggestion is that the result of pressing Ctrl+k should be the same for the http:// url and the www url


Example Use Cases:

  1. I am a developer who has c/p'd a block of text, from outside WordPress, that has multiple unprefixed www links
  2. I am a user who has typed an unprefixed www link out (because that is how I want it to appear on the rendered page)

Reason for the suggestion:
In both example cases above, I have to go through the extra step of pasting or retyping the www.url.com into the input field. In both cases this slows down my workflow. In example 1, it introduces more possibility for error (since I might space out and accidentally paste the previous link's address into the new one). In example two, it's a less friendly experience - if I'm a user with low tech literacy or poor memory/focus, its an extra unnecessary step that's probably going to throw me off or frustrate me (especially if WordPress is new and confusing to me in the first place).


Since http://url.com and www.url.com are essentially equivalent, it makes sense for the Ctrl+k behavior to be equivalent too.

Hope that helps clarify!

Last edited 8 years ago by lunacodes (previous) (diff)

#3 @afercia
8 years ago

  • Focuses accessibility removed

#4 @azaozz
5 years ago

  • Component changed from TinyMCE to Editor

This is still the case in the block editor. Moving to the "editor" component for consideration there.

#5 @desrosj
5 years ago

  • Keywords reporter-feedback removed
  • Resolution set to reported-upstream
  • Status changed from new to closed

I'm going to close this out as reported-upstream.

Because the Classic Editor is in bug fix only mode, any enhancement or change requests need to be submitted to the Gutenberg GitHub repository to be considered. Any changes made would be merged into WordPress when the packages are updated.

Opened a new issue on GitHub here: https://github.com/WordPress/gutenberg/issues/18193.

Note: See TracTickets for help on using tickets.