VisualEditor/Basic example worksheet

Jump to: navigation, search

Some test cases for VisualEditor.

Text formatting and lists[edit | edit source]

Text style[edit | edit source]

This is some basic text. This is a link and some italics bold text.

Here we talk shop about code because code instanceof Poetry === true. And perhaps some text using the obsolete teletype text element.

Links[edit | edit source]

Lists[edit | edit source]

  • This bullet list should display "normally"
  • With another bullet
    • With a sub-item
      1. A numbered sub-sub-item
      2. And its successor
  • And be able to be split, extended, in-/out-dented and ended as normal.

Caching layers:

  1. Browser caches
    1. Native browser cache
    2. HTML5 Web Storage (SessionStorage, LocalStorage, ..)
  2. Front-end Varnishes
    Varnish caches the entire HTTP responses, including thumbnails of images, frequently-requested pages, ResourceLoader modules, and similar items that can be retrieved over HTTP. The front-end Varnishes keep these in memory. A weighted-random load balancer (LVS) distributes web requests to the front-end Varnishes.
  3. Back-end Varnishes
    When a front-end Varnish doesn't have a response cached, it passes the request to the back-end.
  4. memcached
  5. Object cache
  6. Query cache

Preformatted[edit | edit source]

== Preformatted ==
Example '''test''' with [[link]] and <em>emphasis</em>.

Syntax highlighter[edit | edit source]

See also Extension:SyntaxHighlight GeSHi


var util = require('util');

 * A non-empty basket of green-coloured fruits
 * that are not pears.
 * @class
 * @extends FruitBigBasket
 * @constructor
 * @param {Array} items
 * @throws {InvalidArgumentError} If basket contains unexpected items.
function SmoigelBasket(items) {
	SmoigelBasket.super_.apply(this, arguments);

	if (
		!items.length ||
			items.some(function (item) {
				return !item.color.isLike(Color.newFromKeyword('green')) || item instanceof PearFruit;
	) {
		throw new InvalidArgumentError();

util.inherits(SmoigelBasket, FruitBigBasket);


	Registry, TraditionRegistry,
	Fruit, PearFruit,
	Event, BirthdayEvent, TransferEvent,
	Basket, BigBasket, FruitBigBasket,
	Human, MaleHuman, FemaleHuman,
var util = require('util');

 * "Origin"
 * Based on a scene from an episode of Friday Night Dinner.
 * @package Smoigel
 * @author Timo Tijhof, 2013

var traditions = TraditionRegistry.getSingleton();

var e = new TransferEvent({
	spec: {
		from: {
			instanceof: Human

		items: [SmoigelBasket],

		 * Custom validation.
		 * @param {Human} target
		 * @param {Event} concurrentEvent Instance of spec.when.
		 * @return {boolean}
		to: function (target, concurrentEvent) {
			// To the eldest son of the family, so, a male.
			return target instanceof MaleHuman &&
				// Validate the target is a child in the family of the home
				// the party subject lives in. Not a sibling per se, because
				// he or she could be either a child or a parent.
				// The gift should be given to the eldest son of the family he lives in
				// (not of the family the object is born in, per se).
				concurrentEvent.getSubject().getHomeFamily().getChildren().toArray().indexOf(target) !== -1 &&
				// Finally confirm he has no older siblings.
				target.siblings.sort(function (a, b) {
					return a.age < b.age;
				})[0] === target;
		when: BirthdayEvent

Quote[edit | edit source]

Plain blockquote:

Cupcake ipsum dolor sit amet tart powder tootsie roll cotton candy. Lollipop tootsie roll tiramisu chocolate bar jelly-o ice cream tootsie roll powder. I love jelly-o chupa chups applicake. Candy fruitcake muffin liquorice oat cake.

– Cupcake Ipsum

Fancy blockquote:

This was a triumph. I'm making a note here: HUGE SUCCESS.

So I'm GLaD. I got burned.


GLaDOS was "making a note here".

Tables[edit | edit source]

Keys Values
foo lorem
bar ipsum
baz dolor
quux sit
Keys Transcluded table heading
foo transcluded cell value
bar ipsum
baz transcluded table data
quux sit

Enhanced elements[edit | edit source]

Table with sortable (jquery.tablesorter) and mw-collapsible (jquery.makeCollapsible).

Keys Values
foo lorem
bar ipsum
baz dolor
quux sit

Headings![edit | edit source]

Are![edit | edit source]

Really![edit | edit source]
Over-used![edit | edit source]


Media files[edit | edit source]

This is an inline hello image, a frameless Test. one, and a block one with a caption:

hello, you should be able to drag this around.

Image without defined size VisualEditor-logo.svg

This is a video file that you should be able to see.



Bold text:


Multi-line text:

Test split on multiple lines.



Foo[edit | edit source]


Bar[edit | edit source]


With an inline image:

Test Test..

With a thumb image:


With a ref:

  1. Heya.

With a div:


Templates[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)

Transclusion with html comment in target — Preceding unsigned comment added by User:Krinkle (talkcontribs) 21:42, 9 July 2014 (CEST).

Transclusion with wikitext expression as target — Preceding unsigned comment added by User:Krinkle (talkcontribs) 21:42, 9 July 2014 (CEST).

Wikimedia engineering activity

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

WikiHiero[edit | edit source]

See also Extension:WikiHiero

Poem[edit | edit source]

Species C1 C2 C3
Sp1 1 1 0
Sp2 1 0 1
Sp3 1 1 1

References[edit | edit source]

Simple reference.[1]

Bold text reference.[2]

Multi-line reference.[3]

In-line image in a reference.[4]

Block-level image in a reference.[5]

Heading in a reference.[6]

Template in a reference.[7]

Another Template in a reference.[8]

List in a reference.[9]

Multi-level lists in a reference.[10]

Reference in a reference.[11]

Cite web[edit | edit source]

And inline in a reference. [12]

References list[edit | edit source]

  1. Simple reference!
  2. Bold text reference!
  3. Multi-line reference!
  4. In-line image in a reference! Test.
  5. Block-level image in a reference!
  6. This is a

    Heading[edit | edit source]

    in a reference!

  7. Template "Echo". Echoed content!
  8. Template "Unsigned". — Preceding unsigned comment added by MediaWiki default (talkcontribs)
    • List
    • in
    • a
    • reference!
    1. Multi-level
      • lists
    2. reference!
  9. Reference[notes 1]
  10. Template:Cite web

Notes list[edit | edit source]

  1. in a reference

See also[edit | edit source]