mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-17 03:18:48 +00:00
fadd7c46a2
Pretty straightforward, although we should start thinking about grouping/hiding 'advanced' formatting options in the toolbar. Making this button experimental for now until we've come up with a way to deal with this problem. Bug: 51590 Change-Id: Ieb1935b742aced4b883d8a194e6cb69be68473d0
42 lines
924 B
JavaScript
42 lines
924 B
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', 'link', 'code', 'clear'] },
|
|
{ 'items': ['number', 'bullet', 'outdent', 'indent'] }
|
|
];
|
|
|
|
ve.init.Target.static.surfaceCommands = [
|
|
'bold', 'italic', 'link', 'undo', 'redo', 'indent', 'outdent'
|
|
];
|