mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
ba6a304102
* Something to be said for code alignment - easier on the eye! * Maybe a good case for breaking mediawiki coding guidelines. * But, happy to abandon commit if not useful. :) Change-Id: I1133af488f572ac7f8727be9108e08e14c4e6420
58 lines
1.5 KiB
JavaScript
58 lines
1.5 KiB
JavaScript
/* -------------------------------------------------------------------
|
|
* The WikitextConstant structure holds "global constants" that
|
|
* capture properties about wikitext markup.
|
|
*
|
|
* Ex: Valid options for wikitext image markup
|
|
*
|
|
* This structure, over time, can come to serve as useful documentation
|
|
* about Wikitext itself. For now, this is barebones and sparse.
|
|
* ------------------------------------------------------------------- */
|
|
|
|
WikitextConstants = {
|
|
// Valid image options:
|
|
// * Prefix options are of the form "alt=foo"
|
|
// * Simple options are of the form "center"
|
|
//
|
|
// See http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax
|
|
// for more information about how they are used.
|
|
Image: {
|
|
PrefixOptions: {
|
|
'link' : 'link',
|
|
'alt' : 'alt',
|
|
'page' : 'page',
|
|
'thumbnail': 'thumbnail',
|
|
'thumb' : 'thumb',
|
|
'upright' : 'aspect'
|
|
},
|
|
SimpleOptions: {
|
|
// halign
|
|
'left' : 'halign',
|
|
'right' : 'halign',
|
|
'center': 'halign',
|
|
'float' : 'halign',
|
|
'none' : 'halign',
|
|
|
|
// valign
|
|
'baseline' : 'valign',
|
|
'sub' : 'valign',
|
|
'super' : 'valign',
|
|
'top' : 'valign',
|
|
'text-top' : 'valign',
|
|
'middle' : 'valign',
|
|
'bottom' : 'valign',
|
|
'text-bottom': 'valign',
|
|
|
|
// format
|
|
'border' : 'format',
|
|
'frameless': 'format',
|
|
'frame' : 'format',
|
|
'thumbnail': 'format',
|
|
'thumb' : 'format'
|
|
}
|
|
}
|
|
};
|
|
|
|
if (typeof module == "object") {
|
|
module.exports.WikitextConstants = WikitextConstants;
|
|
}
|