TinyMCE: then toggling the paste in plain text mode disable the warning message after the second time.
Fixes #28612. Built from https://develop.svn.wordpress.org/trunk@36807 git-svn-id: http://core.svn.wordpress.org/trunk@36774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
40b3bb7988
commit
a0978ec8b4
|
@ -566,8 +566,23 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
|||
wp.autosave.server.triggerSave();
|
||||
}
|
||||
} );
|
||||
|
||||
if ( window.getUserSetting( 'editor_plain_text_paste_warning' ) > 1 ) {
|
||||
editor.settings.paste_plaintext_inform = false;
|
||||
}
|
||||
} );
|
||||
|
||||
editor.on( 'PastePlainTextToggle', function( event ) {
|
||||
// Warn twice, then stop.
|
||||
if ( event.state === true ) {
|
||||
var times = parseInt( window.getUserSetting( 'editor_plain_text_paste_warning' ), 10 ) || 0;
|
||||
|
||||
if ( times < 2 ) {
|
||||
window.setUserSetting( 'editor_plain_text_paste_warning', ++times );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Experimental: create a floating toolbar.
|
||||
* This functionality will change in the next releases. Not recommended for use by plugins.
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-beta1-36806';
|
||||
$wp_version = '4.5-beta1-36807';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue