TinyMCE: add stub for the missing editor.controlManager to the compat3x plugin. See #24067.
git-svn-id: https://develop.svn.wordpress.org/trunk@26897 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
17f36f016a
commit
1fb853d24a
@ -127,6 +127,25 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cmNoop() {
|
||||||
|
var obj = {}, methods = 'add addMenu addSeparator collapse createMenu destroy displayColor expand focus ' +
|
||||||
|
'getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark ' +
|
||||||
|
'postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex ' +
|
||||||
|
'setActive setAriaProperty setColor setDisabled setSelected setState showMenu update';
|
||||||
|
|
||||||
|
log('editor.controlManager.*');
|
||||||
|
|
||||||
|
function _noop() {
|
||||||
|
return cmNoop();
|
||||||
|
}
|
||||||
|
|
||||||
|
tinymce.each( methods.split(' '), function( method ) {
|
||||||
|
obj[method] = _noop;
|
||||||
|
});
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
editor.controlManager = {
|
editor.controlManager = {
|
||||||
buttons: {},
|
buttons: {},
|
||||||
|
|
||||||
@ -144,7 +163,25 @@
|
|||||||
if (this.buttons[name]) {
|
if (this.buttons[name]) {
|
||||||
this.buttons[name].active(state);
|
this.buttons[name].active(state);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
onAdd: new Dispatcher(),
|
||||||
|
onPostRender: new Dispatcher(),
|
||||||
|
|
||||||
|
add: function(obj) { return obj; },
|
||||||
|
createButton: cmNoop,
|
||||||
|
createColorSplitButton: cmNoop,
|
||||||
|
createControl: cmNoop,
|
||||||
|
createDropMenu: cmNoop,
|
||||||
|
createListBox: cmNoop,
|
||||||
|
createMenuButton: cmNoop,
|
||||||
|
createSeparator: cmNoop,
|
||||||
|
createSplitButton: cmNoop,
|
||||||
|
createToolbar: cmNoop,
|
||||||
|
createToolbarGroup: cmNoop,
|
||||||
|
destroy: noop,
|
||||||
|
get: noop,
|
||||||
|
setControlType: cmNoop
|
||||||
};
|
};
|
||||||
|
|
||||||
patchEditorEvents("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate", "editor");
|
patchEditorEvents("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate", "editor");
|
||||||
|
Loading…
Reference in New Issue
Block a user