TinyMCE: fix Ctrl + s shortcut (trigger autosave), see #24067.
git-svn-id: https://develop.svn.wordpress.org/trunk@27052 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
031414171e
commit
5bb6b2ecec
@ -368,8 +368,8 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
|||||||
editor.addShortcut( modKey + '+h', '', 'WP_Help' );
|
editor.addShortcut( modKey + '+h', '', 'WP_Help' );
|
||||||
editor.addShortcut( modKey + '+p', '', 'WP_Page' );
|
editor.addShortcut( modKey + '+p', '', 'WP_Page' );
|
||||||
editor.addShortcut( 'ctrl+s', '', function() {
|
editor.addShortcut( 'ctrl+s', '', function() {
|
||||||
if ( typeof autosave === 'function' ) {
|
if ( typeof wp !== 'undefined' && wp.autosave ) {
|
||||||
autosave();
|
wp.autosave.server.triggerSave();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user