mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 13:41:24 +01:00
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,6 +566,21 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
|||||||
wp.autosave.server.triggerSave();
|
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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
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.5-beta1-36806';
|
$wp_version = '4.5-beta1-36807';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user