Page MenuHomePhabricator

Automatically replace external URL:s with wiki links in the "Add a link" dialogue
Closed, DuplicatePublicFeature

Description

Feature summary (what you would like to be able to do and where):
Automatically replace external URL:s with wiki links in the "Add a link" dialogue.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
In Visual Editor, it would be helpful if you could add links to (other) wikis by entering the full URL. I often copy-paste links to other wikis. In these cases I prefer to have a wiki link rather than an external link (not sure exactly what differences there are between the links, but since wiki links are a thing there must be some benefits🙂). This has to be done manually by replacing the first part of the URL with wiki link synatx, e.g. https://en.wikipedia.org/wiki/Monkey -> w:en:Monkey. As with all manual work, this takes extra time and prone to errors (e.g. remembering what prefixes different wikis have).

A top-of-my-head solution would be to do a simple when the user clicks on the "Wikimedia" tab in the "Add a link" dialogue, if the URL matches a known wiki.

Benefits (why should this be implemented?):
This would streamline the workflow when linking between wikis and would reduce the amount of incorrect links being added.

Event Timeline

There is actually such automatical replacement, but it only occurs after you save the edit (or preview the wikitext diff), in Parsoid rather than VisualEditor.