mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
23af88edc3
Bug: 51612 Change-Id: Ia05e09a411213cbc035ad9dd3d3156d57f8e102c
54 lines
1.1 KiB
JavaScript
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'
|
|
];
|