PHP Classes

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

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/visualchars/src/main/js/core/Keyboard.js   Download  
File: public/js/tinymce/src/plugins/visualchars/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: 864 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.visualchars.core.Keyboard', [ 'tinymce.core.util.Delay', 'tinymce.plugins.visualchars.core.VisualChars' ], function (Delay, VisualChars) { var setup = function (editor, toggleState) { var debouncedToggle = Delay.debounce(function () { VisualChars.toggle(editor); }, 300); if (editor.settings.forced_root_block !== false) { editor.on('keydown', function (e) { if (toggleState.get() === true) { e.keyCode === 13 ? VisualChars.toggle(editor) : debouncedToggle(); } }); } }; return { setup: setup }; } );