Fix the standalone toolbar to not demote heading1

The duplication of the toolbar definition is ugly but we don't
have a better system to say "give me the same except demote this
one thing" right now.

Change-Id: Id74ed1a18aee4a947992bdd626702f578bbace14
This commit is contained in:
Roan Kattouw 2013-12-13 12:24:54 -08:00
parent 69957698c7
commit af4b7bd067
2 changed files with 37 additions and 1 deletions

View file

@ -189,6 +189,42 @@ ve.init.mw.Target = function VeInitMwTarget( $container, pageName, revisionId )
OO.inheritClass( ve.init.mw.Target, ve.init.Target );
/* Static Properties */
ve.init.mw.Target.static.toolbarGroups = [
// History
{ 'include': [ 'undo', 'redo' ] },
// Format
{
'type': 'menu',
'include': [ { 'group': 'format' } ],
'promote': [ 'paragraph' ],
'demote': [ 'preformatted', 'heading1' ]
},
// Style
{
'type': 'list',
'icon': 'text-style',
'include': [ { 'group': 'textStyle' }, 'clear' ],
'promote': [ 'bold', 'italic' ],
'demote': [ 'strikethrough', 'code', 'underline', 'clear' ]
},
// Link
{ 'include': [ 'link' ] },
// Structure
{
'type': 'bar',
'include': [ 'number', 'bullet', 'outdent', 'indent' ]
},
// Insert
{
'include': '*',
'label': 'visualeditor-toolbar-insert',
'demote': [ 'specialcharacter' ]
}
];
/* Static Methods */
/**

View file

@ -37,7 +37,7 @@ ve.init.Target.static.toolbarGroups = [
'type': 'menu',
'include': [ { 'group': 'format' } ],
'promote': [ 'paragraph' ],
'demote': [ 'preformatted', 'heading1' ]
'demote': [ 'preformatted' ]
},
// Style
{