mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 03:08:42 +00:00
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:
parent
69957698c7
commit
af4b7bd067
|
@ -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 */
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,7 +37,7 @@ ve.init.Target.static.toolbarGroups = [
|
|||
'type': 'menu',
|
||||
'include': [ { 'group': 'format' } ],
|
||||
'promote': [ 'paragraph' ],
|
||||
'demote': [ 'preformatted', 'heading1' ]
|
||||
'demote': [ 'preformatted' ]
|
||||
},
|
||||
// Style
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue