Last modified: 2014-11-12 13:33:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67540, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65540 - VisualEditor: Automatically convert inserted URLs to readable formatted links
VisualEditor: Automatically convert inserted URLs to readable formatted links
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-20 17:58 UTC by Amir E. Aharoni
Modified: 2014-11-12 13:33 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Amir E. Aharoni 2014-05-20 17:58:12 UTC
Quora has a lovely feature in its visual editor: paste a URL and it's immediately and automatically converted in a smart way.

* If it's a link to another answer on Quora, it is given an appropriate title.
* If it's a link to YouTube, the video is embedded.
* If it's a link to some other website, the page's HTML <title> is inserted and automatically linked. (There may be other special cases, but you get the idea.)

After the link is thus inserted, the user can edit the text or click another button to make the actual URL appear or to make the URL just plain text.

I'd love such a feature in VE. It's especially relevant for newbies who link to other Wikipedia articles with full http links as if they were external. For external links, getting the title automatically is usually better than having a plain URL (in fact, there are some bots that automatically insert such titles). And pasting a Commons URL can embed the media as such.
Comment 1 James Forrester 2014-05-20 18:05:28 UTC
Interesting idea. We've got some work planned to do this kind of thing for citations (you feed it a URL, it inserts a nice <ref>{{cite web|…}}</ref> block), and links to internal or interwiki targets get auto-converted on save (so [[:en:Foo|Bar]] not [https://en.wikipedia.org/wiki/Foo Bar]), but we don't do this for pasting into the surface. Maybe something we could do in the future?
Comment 2 mvolz 2014-10-29 11:01:23 UTC
This could potentially inform the VE UI for citoid;

I.e. we could have have one reference dialog, (i.e. the basic reference dialog) and then if a user pastes a link *into* the reference dialog, that inserts the citation guessed from the link. And then keep the drop down menu for individual templates in the ref dialog.

This does take some user discovery; however, I see this commonly being done with references already- i.e. a ref tag containing only an unformatted url. So it seems people are already just pasting links into the ref field and this is a natural enhancement of that work flow. 

This, by the way, is what both G+ and Facebook do for links as well, not just Quora. So there may be already some user comfort with a pasted link becoming formatted in some fashion.
Comment 3 James Forrester 2014-10-30 18:28:54 UTC
Hmm. Right now we're taking newly-created external links and displaying them as auto-numbered link nodes; having this as a secondary mode to fetching the <title> could work, but… I'm not sure.
Comment 4 Amir E. Aharoni 2014-11-12 13:20:49 UTC
I meant not only external links, but pages in the same wiki, too. It's anecdotal, but I see newbies adding http urls to other Wikipedia article instead of using square brackets, and this should be DWIMmier.
Comment 5 James Forrester 2014-11-12 13:33:31 UTC
(In reply to Amir E. Aharoni from comment #4)
> I meant not only external links, but pages in the same wiki, too. It's
> anecdotal, but I see newbies adding http urls to other Wikipedia article
> instead of using square brackets, and this should be DWIMmier.

Those already get converted to internal (well, interwiki) links, though…

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links