TinyMCE: remove the numbers (2-6) after the headings in the drop-down. These are previews for the actual styling of headings in the editor.

See #27159.

git-svn-id: https://develop.svn.wordpress.org/trunk@38939 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2016-10-26 01:41:46 +00:00
parent 307ba51640
commit 3af74dfcbb
2 changed files with 7 additions and 0 deletions

View File

@ -839,6 +839,7 @@ final class _WP_Editors {
'Formats' => _x( 'Formats', 'TinyMCE' ),
'Headings' => _x( 'Headings', 'TinyMCE' ),
'Heading' => _x( 'Heading', 'TinyMCE' ),
'Heading 1' => array( __( 'Heading 1' ), 'access1' ),
'Heading 2' => array( __( 'Heading 2' ), 'access2' ),
'Heading 3' => array( __( 'Heading 3' ), 'access3' ),

View File

@ -578,6 +578,12 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
each( listbox.settings.values, function( item ) {
if ( item.text && labels.hasOwnProperty( item.text ) ) {
item.shortcut = '(' + labels[ item.text ] + ')';
// Drop the numbers after the labels for headings.
// TinyMCE makes previews for the h1-h6. It uses the same styles that are applied in the editor body.
if ( item.text.indexOf( 'Heading' ) !== -1 ) {
item.text = 'Heading';
}
}
} );
}