2013-02-20 19:44:44 +00:00
|
|
|
/*!
|
|
|
|
* 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
|
2013-05-01 22:21:32 +00:00
|
|
|
* @mixins ve.EventEmitter
|
2013-02-20 19:44:44 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {jQuery} $container Conainter to render target into
|
|
|
|
*/
|
|
|
|
ve.init.Target = function VeInitTarget( $container ) {
|
2013-05-01 22:21:32 +00:00
|
|
|
// Mixin constructors
|
2013-02-20 19:44:44 +00:00
|
|
|
ve.EventEmitter.call( this );
|
|
|
|
|
|
|
|
// Properties
|
|
|
|
this.$ = $container;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2013-05-01 22:21:32 +00:00
|
|
|
ve.mixinClass( ve.init.Target, ve.EventEmitter );
|
2013-05-10 00:17:51 +00:00
|
|
|
|
2013-05-14 23:45:42 +00:00
|
|
|
/* Static Properties */
|
2013-05-10 00:17:51 +00:00
|
|
|
|
2013-08-09 18:29:09 +00:00
|
|
|
ve.init.Target.static.toolbarGroups = [
|
2013-08-27 23:28:29 +00:00
|
|
|
|
|
|
|
{ 'include': [ 'undo', 'redo' ] },
|
2013-08-09 18:29:09 +00:00
|
|
|
{
|
2013-08-27 23:28:29 +00:00
|
|
|
'type': 'menu',
|
|
|
|
'include': [ { 'group': 'format' } ],
|
|
|
|
'promote': [ 'paragraph' ],
|
|
|
|
'demote': [ 'preformatted', 'heading1' ]
|
2013-08-09 18:29:09 +00:00
|
|
|
},
|
2013-08-27 23:28:29 +00:00
|
|
|
{ 'include': [ 'bold', 'italic', 'link', 'clear' ] },
|
|
|
|
{ 'include': [ 'number', 'bullet', 'outdent', 'indent' ] },
|
|
|
|
{ 'include': '*' }
|
2013-05-14 23:45:42 +00:00
|
|
|
];
|
2013-05-10 00:17:51 +00:00
|
|
|
|
2013-05-14 23:45:42 +00:00
|
|
|
ve.init.Target.static.surfaceCommands = [
|
2013-08-27 23:28:29 +00:00
|
|
|
'undo', 'redo', 'bold', 'italic', 'link', 'clear', 'indent', 'outdent'
|
2013-05-14 23:45:42 +00:00
|
|
|
];
|