本文整理汇总了TypeScript中tinymce/core/api/Editor.off函数的典型用法代码示例。如果您正苦于以下问题:TypeScript off函数的具体用法?TypeScript off怎么用?TypeScript off使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了off函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
editor.on('remove', () => {
// We probably don't need these unbinds, but it helps to have them if we move this code out.
editor.off('mousedown', onContentMousedown);
editor.off('touchstart', onContentMousedown);
editor.off('mouseup', onContentMouseup);
editor.off('ResizeWindow', onWindowResize);
editor.off('ScrollWindow', onWindowScroll);
onMousedown.unbind();
onTouchstart.unbind();
onMouseup.unbind();
});
示例2: function
suite.test('OpenWindow/CloseWindow events', function (editor: Editor) {
let openWindowArgs, closeWindowArgs;
editor.on('CloseWindow', function (e) {
closeWindowArgs = e;
});
editor.on('OpenWindow', function (e) {
openWindowArgs = e;
editor.windowManager.close();
});
editor.windowManager.open({
title: 'Find and Replace',
body: {
type: 'panel',
items: []
},
buttons: []
});
LegacyUnit.equal(openWindowArgs.type, 'openwindow');
LegacyUnit.equal(closeWindowArgs.type, 'closewindow');
editor.off('CloseWindow OpenWindow');
});
示例3: function
const bindHandler = function (label, handler) {
editor.on(label, handler);
return {
unbind () {
editor.off(label);
}
};
};
示例4: return
return () => ed.off('splitbutton1-toggle', f);
示例5: return
return () => editor.off('PastePlainTextToggle', pastePlainTextToggleHandler);
示例6: return
return () => editor.off('Undo Redo AddUndo TypingUndo ClearUndos SwitchMode', onUndoStateChange);
示例7: return
return () => editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
示例8: return
return () => {
editor.off(spellcheckerEvents, setMenuItemCheck);
};