Page MenuHomePhabricator

Import of preformatted templates into an article
Closed, ResolvedPublic0 Estimated Story Points

Description

The motivation for this is that a few important sites in Norway (National library, DigitaltMuseum,..) provides us with preformatted cite-templates.

A story could be

Given that I have an article open for editing in VisualEditor
And that I have a copy of a preformatted template on the clipboard
When I paste the template
Then I want the VE to recognize it as a reference
And wrap it up accordingly

An alternate story is

Given that I have an article open for editing in VisualEditor
And that I have a copy of a preformatted template on the clipboard
When I paste the template
Then I want the VE to recognize it as a template

and then

Given that I have an article open for editing in VisualEditor
And with an inserted template
When I select that template
And chose "Change to reference"
Then I want VE to wrap it within a ref-tag and open the ref-dialog

Event Timeline

jeblad added a project: VisualEditor.
jeblad updated the task description. (Show Details)

Can you give an example of such a template?

Jdforrester-WMF changed the task status from Open to Stalled.May 24 2016, 7:12 PM
Jdforrester-WMF subscribed.

Waiting for an example.

Some of the sites should be harvested through citoid, but they don't work as they should

From nb.no

{{ Kilde bok | forfatter = Ibsen, Henrik (1828-1906) | utgivelsesår = 1884 | tittel = Vildanden: skuespil i fem akter | utgivelsessted = København | forlag = Gyldendalske Boghandel | url = http://urn.nb.no/URN:NBN:no-nb_digibok_2013052824005 | side = }}

From digitaltmuseum.no

{{cite web |url=http://digitaltmuseum.no/011023245532 |title=Avisside i glass og ramme|publisher=DigitaltMuseum |accessdate=~~~~~}}

Opening a cité dialog, choosing "standard form" and pasting a template there now work, and it will create a reference.

It is still not possible to wrap an existing template in ref-tags.

The second template, the one from DigitaltMuseum, uses five tildes. Those does not work in VE.

In VE open Cité, write <ref, chose manual, chose standardform, paste copied template, then "Apply". This works.

This is also added at mw:VisualEditor/Receipes with a further explanation at mw:Topic:Tompi03mlrtngz11.