PHP Classes

File: public/js/tinymce/src/plugins/contextmenu/src/main/js/core/Bind.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/contextmenu/src/main/js/core/Bind.js   Download  
File: public/js/tinymce/src/plugins/contextmenu/src/main/js/core/Bind.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 947 bytes
 

Contents

Class file image Download
/** * Bind.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ define( 'tinymce.plugins.contextmenu.core.Bind', [ 'tinymce.plugins.contextmenu.api.Settings', 'tinymce.plugins.contextmenu.core.Coords', 'tinymce.plugins.contextmenu.ui.ContextMenu' ], function (Settings, Coords, ContextMenu) { var isNativeOverrideKeyEvent = function (editor, e) { return e.ctrlKey && !Settings.shouldNeverUseNative(editor); }; var setup = function (editor, visibleState, menu) { editor.on('contextmenu', function (e) { if (isNativeOverrideKeyEvent(editor, e)) { return; } e.preventDefault(); ContextMenu.show(editor, Coords.getPos(editor, e), visibleState, menu); }); }; return { setup: setup }; } );