PHP Classes

File: public/js/tinymce/src/core/src/main/js/keyboard/SpaceKey.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/core/src/main/js/keyboard/SpaceKey.js   Download  
File: public/js/tinymce/src/core/src/main/js/keyboard/SpaceKey.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: 934 bytes
 

Contents

Class file image Download
/** * SpaceKey.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.core.keyboard.SpaceKey', [ 'tinymce.core.keyboard.InsertSpace', 'tinymce.core.keyboard.MatchKeys', 'tinymce.core.util.VK' ], function (InsertSpace, MatchKeys, VK) { var executeKeydownOverride = function (editor, evt) { MatchKeys.execute([ { keyCode: VK.SPACEBAR, action: MatchKeys.action(InsertSpace.insertAtSelection, editor) } ], evt).each(function (_) { evt.preventDefault(); }); }; var setup = function (editor) { editor.on('keydown', function (evt) { if (evt.isDefaultPrevented() === false) { executeKeydownOverride(editor, evt); } }); }; return { setup: setup }; } );