mediawiki-extensions-Visual.../modules/ve/init/ve.init.Target.js
James D. Forrester 23af88edc3 Create a subscript tool
Bug: 51612
Change-Id: Ia05e09a411213cbc035ad9dd3d3156d57f8e102c
2013-08-15 19:40:15 +00:00

54 lines
1.1 KiB
JavaScript

/*!
* VisualEditor Initialization Target class.
*
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Generic Initialization target.
*
* @class
* @abstract
* @mixins ve.EventEmitter
*
* @constructor
* @param {jQuery} $container Conainter to render target into
*/
ve.init.Target = function VeInitTarget( $container ) {
// Mixin constructors
ve.EventEmitter.call( this );
// Properties
this.$ = $container;
};
/* Inheritance */
ve.mixinClass( ve.init.Target, ve.EventEmitter );
/* Static Properties */
ve.init.Target.static.toolbarTools = [
{ 'items': ['undo', 'redo'] },
{ 'items': ['format'] },
{ 'items': ['bold', 'italic', 'strikethrough', 'subscript', 'superscript',
'underline', 'link', 'code', 'language', 'clear'] },
{ 'items': ['number', 'bullet', 'outdent', 'indent'] }
];
ve.init.Target.static.surfaceCommands = [
'bold',
'italic',
//'strikethrough',
//'subscript',
//'superscript',
//'underline',
'link',
//'language',
'undo',
'redo',
'indent',
'outdent'
];