TinyMCE: add help for the text patterns to the shortcuts help popup.
See #31441. Built from https://develop.svn.wordpress.org/trunk@33127 git-svn-id: http://core.svn.wordpress.org/trunk@33098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
34eb53b4e6
commit
cacf51c3ec
|
@ -1045,6 +1045,8 @@ final class _WP_Editors {
|
||||||
'Action' => __( 'Action' ),
|
'Action' => __( 'Action' ),
|
||||||
'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' =>
|
'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' =>
|
||||||
__( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ),
|
__( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ),
|
||||||
|
'When starting a new paragraph with one of these patterns followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' =>
|
||||||
|
__( 'When starting a new paragraph with one of these patterns followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' ),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -150,6 +150,9 @@
|
||||||
.mce-window .wp-editor-help th {
|
.mce-window .wp-editor-help th {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 5px 0 0;
|
padding: 5px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mce-window .wp-editor-help .wp-help-th-center th {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -150,6 +150,9 @@
|
||||||
.mce-window .wp-editor-help th {
|
.mce-window .wp-editor-help th {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 5px 0 0;
|
padding: 5px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mce-window .wp-editor-help .wp-help-th-center th {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -205,7 +205,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
meta = tinymce.Env.mac ? __( 'Cmd + letter:' ) : __( 'Ctrl + letter:' ),
|
meta = tinymce.Env.mac ? __( 'Cmd + letter:' ) : __( 'Ctrl + letter:' ),
|
||||||
table1 = [],
|
table1 = [],
|
||||||
table2 = [],
|
table2 = [],
|
||||||
header;
|
header, html;
|
||||||
|
|
||||||
each( [
|
each( [
|
||||||
{ c: 'Copy', x: 'Cut' },
|
{ c: 'Copy', x: 'Cut' },
|
||||||
|
@ -250,33 +250,56 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
header = [ __( 'Letter' ), __( 'Action' ), __( 'Letter' ), __( 'Action' ) ];
|
header = [ __( 'Letter' ), __( 'Action' ), __( 'Letter' ), __( 'Action' ) ];
|
||||||
header = '<tr class="wp-help-header"><td>' + header.join( '</td><td>' ) + '</td></tr>';
|
header = '<tr class="wp-help-header"><td>' + header.join( '</td><td>' ) + '</td></tr>';
|
||||||
|
|
||||||
|
html = '<div class="wp-editor-help">';
|
||||||
|
|
||||||
|
// Main section, default and additional shortcuts
|
||||||
|
html = html +
|
||||||
|
'<p>' + __( 'Default shortcuts,' ) + ' ' + meta + '</p>' +
|
||||||
|
'<table class="wp-help-th-center">' +
|
||||||
|
header +
|
||||||
|
table1.join('') +
|
||||||
|
'</table>' +
|
||||||
|
'<p>' + __( 'Additional shortcuts,' ) + ' ' + access + '</p>' +
|
||||||
|
'<table class="wp-help-th-center">' +
|
||||||
|
header +
|
||||||
|
table2.join('') +
|
||||||
|
'</table>';
|
||||||
|
|
||||||
|
if ( editor.plugins.wptextpattern ) {
|
||||||
|
// Text pattern section
|
||||||
|
html = html +
|
||||||
|
'<p>' + __( 'When starting a new paragraph with one of these patterns followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' ) + '</p>' +
|
||||||
|
'<table>' +
|
||||||
|
tr({ '* or -': 'Bullet list' }) +
|
||||||
|
tr({ '1. or 1)': 'Numbered list' }) +
|
||||||
|
tr({ '>': 'Blockquote' }) +
|
||||||
|
tr({ '##': 'Heading 2' }) +
|
||||||
|
tr({ '###': 'Heading 3' }) +
|
||||||
|
tr({ '####': 'Heading 4' }) +
|
||||||
|
tr({ '#####': 'Heading 5' }) +
|
||||||
|
tr({ '######': 'Heading 6' }) +
|
||||||
|
'</table>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Focus management section
|
||||||
|
html = html +
|
||||||
|
'<p>' + __( 'Focus shortcuts:' ) + '</p>' +
|
||||||
|
'<table>' +
|
||||||
|
tr({ 'Alt + F8': 'Inline toolbar (when an image, link or preview is selected)' }) +
|
||||||
|
tr({ 'Alt + F9': 'Editor menu (when enabled)' }) +
|
||||||
|
tr({ 'Alt + F10': 'Editor toolbar' }) +
|
||||||
|
tr({ 'Alt + F11': 'Elements path' }) +
|
||||||
|
'</table>' +
|
||||||
|
'<p>' + __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ) + '</p>';
|
||||||
|
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
editor.windowManager.open( {
|
editor.windowManager.open( {
|
||||||
title: 'Keyboard Shortcuts',
|
title: 'Keyboard Shortcuts',
|
||||||
items: {
|
items: {
|
||||||
type: 'container',
|
type: 'container',
|
||||||
classes: 'wp-help',
|
classes: 'wp-help',
|
||||||
html: (
|
html: html
|
||||||
'<div class="wp-editor-help">' +
|
|
||||||
'<p>' + __( 'Default shortcuts,' ) + ' ' + meta + '</p>' +
|
|
||||||
'<table>' +
|
|
||||||
header +
|
|
||||||
table1.join('') +
|
|
||||||
'</table>' +
|
|
||||||
'<p>' + __( 'Additional shortcuts,' ) + ' ' + access + '</p>' +
|
|
||||||
'<table>' +
|
|
||||||
header +
|
|
||||||
table2.join('') +
|
|
||||||
'</table>' +
|
|
||||||
'<p>' + __( 'Focus shortcuts:' ) + '</p>' +
|
|
||||||
'<table>' +
|
|
||||||
tr({ 'Alt + F8': 'Inline toolbar (when an image, link or preview is selected)' }) +
|
|
||||||
tr({ 'Alt + F9': 'Editor menu (when enabled)' }) +
|
|
||||||
tr({ 'Alt + F10': 'Editor toolbar' }) +
|
|
||||||
tr({ 'Alt + F11': 'Elements path' }) +
|
|
||||||
'</table>' +
|
|
||||||
'<p>' + __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' ) + '</p>' +
|
|
||||||
'</div>'
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
text: 'Close',
|
text: 'Close',
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-beta1-33126';
|
$wp_version = '4.3-beta1-33127';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue