VisualEditor:Template test

From MediaWiki.org
Jump to: navigation, search

Some template examples to play with; add more if you like! See VisualEditor:TestReferenceContents for citation tests.

The hinting code (<templatedata>) that makes editing through the VisualEditor easier is part of the template documentation (links provided by way of example).

Inline template[edit | edit source]

This is an example of using the "Unsigned" template, an inline template which you can edit (documentation): — Preceding unsigned comment added by User:Jdforrester (WMF) (talkcontribs) 16:25, 12 June 2013 (UTC)

Block template[edit | edit source]

This is an example of using the {{Wikimedia engineering project information}} template, a block template which you can edit (documentation):

Template without templatedata[edit | edit source]

Templates need Templatedata added, in order for the description to show, and for the fields to be labeled, whilst they are being edited with VisualEditor.

The two templates above, have templatedata in their respective /doc pages. (i.e. Template:Unsigned/doc and Template:Wikimedia engineering project information/doc)

These following templates do not have any templatedata, so the description is empty, and the un-named-fields are numbered.

{{Nutshell|title=VisualEditor|concisely summarizes this page|shortcut=VE}} =

{{Main|Main page|VisualEditor}} =

Other tests[edit | edit source]

  • This text is followed by an HTML comment () and this follows the comment. As usual, the comment is invisible in the saved page. It is also invisible in when the page is re-edited with VE.
  • For comparison, here is an HTML comment added using edit source () and this follows it.
  • This HTML comment was added using edit source and manually wrapped in nowiki (<!-- never a borrower nor a lender be -->) and this follows it.
  • This HTML comment was copied from the line above, using VE (<!-- never a borrower nor a lender be -->) and this follows it.