Thanks for the help Bartosz.  However, I have a large data definition of
both texts and citations so I was wondering if its possible to insert the
texts and citations
all in one go when writing to the VE surface. In such cases, we expect the
VE surface to identify, the citation where
we are including the 'mwTransclusionInline' template in our data. Please is
this possible?

Thanks

On Wed, Jan 1, 2020 at 4:56 AM Bartosz Dziewoński <[email protected]>
wrote:

> {{Cite web}} and similar templates can also be used outside of a <ref>
> tag, e.g. on a page like this:
> https://en.wikipedia.org/wiki/Review_aggregator#Bibliography (not the
> greatest example, but the best I could find quickly).
>
> If you want it inside of a footnote, it's a bit complicated in visual
> mode, since the footnotes can be reused multiple times. The way it works
> is that there is a separate place in the document where the contents of
> every reference are placed (the "internal list"), and the location of
> the <ref> contains only a small node that links to the internal list.
>
> Manually constructing the data so that both these things refer to each
> other would be a pain, but there is a helper class that makes it more
> convenient, ve.dm.MWReferenceModel.
>
> You'd use it like this:
>
> https://phabricator.wikimedia.org/P10018
>
> I adapted that example from the code in
> ve.ui.MWCitationDialog.prototype.getActionProcess, which is how VE
> itself inserts new references.
>
> Hope that helps (and doesn't look too awful).
>
>
> --
> Bartosz Dziewoński
>
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to