mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 18:08:09 +01:00
TinyMCE wpView: add noop() when returning early, fixes #28921
Built from https://develop.svn.wordpress.org/trunk@29190 git-svn-id: http://core.svn.wordpress.org/trunk@28974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
75d3fe3e65
commit
7f7c3fb54f
@ -10,6 +10,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
|||||||
TreeWalker = tinymce.dom.TreeWalker,
|
TreeWalker = tinymce.dom.TreeWalker,
|
||||||
toRemove = false,
|
toRemove = false,
|
||||||
firstFocus = true,
|
firstFocus = true,
|
||||||
|
_noop = function() { return false; },
|
||||||
cursorInterval, lastKeyDownNode, setViewCursorTries, focus, execCommandView;
|
cursorInterval, lastKeyDownNode, setViewCursorTries, focus, execCommandView;
|
||||||
|
|
||||||
function getView( node ) {
|
function getView( node ) {
|
||||||
@ -155,7 +156,11 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
|||||||
|
|
||||||
// Check if the `wp.mce` API exists.
|
// Check if the `wp.mce` API exists.
|
||||||
if ( typeof wp === 'undefined' || ! wp.mce ) {
|
if ( typeof wp === 'undefined' || ! wp.mce ) {
|
||||||
return;
|
return {
|
||||||
|
getViewText: _noop,
|
||||||
|
setViewText: _noop,
|
||||||
|
getView: _noop
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the content of view wrappers from HTML string
|
// Remove the content of view wrappers from HTML string
|
||||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user