Skip to content

xiidea/ckeditor-easykeymap-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Easy Keymap

CKEditor plugin for custom keymap

Installation

  • Extract the easykeymap folder into the "plugins" folder of CKEditor.
  • In the CKEditor configuration file (config.js) add the following code:
config.extraPlugins = 'easykeymap';
  • You can now define your key map through following config parameter
config.easykeymaps = {
		4456530 : String.fromCharCode(174),   //ALT + R
		4456515 : String.fromCharCode(169)   //ALT + C
	};

OR

config.easykeymaps[CKEDITOR.ALT + 81] = String.fromCharCode(190);    //ALT + Q

OR

CKEDITOR.config.easykeymaps = {
        4456530 : String.fromCharCode(174),   //ALT + R
        4456515 : String.fromCharCode(169)   //ALT + C
   };
  • You can also define shortcut action like this
	config.easykeymaps[CKEDITOR.CTRL + 83] = function(editor, code){
		alert("You have entered 'CTRL + S' (keyCode: "+ code +") In editor: " + editor.name);
	};