mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-21 03:34:28 +00:00
TinyMCE wpView: add noop() when returning early, fixes #28921
git-svn-id: https://develop.svn.wordpress.org/trunk@29190 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -10,6 +10,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
TreeWalker = tinymce.dom.TreeWalker,
|
||||
toRemove = false,
|
||||
firstFocus = true,
|
||||
_noop = function() { return false; },
|
||||
cursorInterval, lastKeyDownNode, setViewCursorTries, focus, execCommandView;
|
||||
|
||||
function getView( node ) {
|
||||
@@ -155,7 +156,11 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
|
||||
// Check if the `wp.mce` API exists.
|
||||
if ( typeof wp === 'undefined' || ! wp.mce ) {
|
||||
return;
|
||||
return {
|
||||
getViewText: _noop,
|
||||
setViewText: _noop,
|
||||
getView: _noop
|
||||
};
|
||||
}
|
||||
|
||||
// Remove the content of view wrappers from HTML string
|
||||
|
||||
Reference in New Issue
Block a user