PHP Classes

File: public/js/tinymce/src/plugins/textpattern/src/main/js/core/Keyboard.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/textpattern/src/main/js/core/Keyboard.js   Download  
File: public/js/tinymce/src/plugins/textpattern/src/main/js/core/Keyboard.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: 1,238 bytes
 

Contents

Class file image Download
/** * Keyboard.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.textpattern.core.Keyboard', [ 'tinymce.core.util.Delay', 'tinymce.core.util.VK', 'tinymce.plugins.textpattern.core.KeyHandler' ], function (Delay, VK, KeyHandler) { var setup = function (editor, patternsState) { var charCodes = [',', '.', ';', ':', '!', '?']; var keyCodes = [32]; editor.on('keydown', function (e) { if (e.keyCode === 13 && !VK.modifierPressed(e)) { KeyHandler.handleEnter(editor, patternsState.get()); } }, true); editor.on('keyup', function (e) { if (KeyHandler.checkKeyCode(keyCodes, e)) { KeyHandler.handleInlineKey(editor, patternsState.get()); } }); editor.on('keypress', function (e) { if (KeyHandler.checkCharCode(charCodes, e)) { Delay.setEditorTimeout(editor, function () { KeyHandler.handleInlineKey(editor, patternsState.get()); }); } }); }; return { setup: setup }; } );