PHP Classes

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

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/lists/src/main/js/core/Keyboard.js   Download  
File: public/js/tinymce/src/plugins/lists/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,267 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.lists.core.Keyboard', [ 'tinymce.core.util.VK', 'tinymce.plugins.lists.actions.Indent', 'tinymce.plugins.lists.actions.Outdent', 'tinymce.plugins.lists.api.Settings', 'tinymce.plugins.lists.core.Delete' ], function (VK, Indent, Outdent, Settings, Delete) { var setupTabKey = function (editor) { editor.on('keydown', function (e) { // Check for tab but not ctrl/cmd+tab since it switches browser tabs if (e.keyCode !== VK.TAB || VK.metaKeyPressed(e)) { return; } if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) { e.preventDefault(); if (e.shiftKey) { Outdent.outdentSelection(editor); } else { Indent.indentSelection(editor); } } }); }; var setup = function (editor) { if (Settings.shouldIndentOnTab(editor)) { setupTabKey(editor); } Delete.setup(editor); }; return { setup: setup }; } );