Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 963 Bytes

README.md

File metadata and controls

41 lines (34 loc) · 963 Bytes

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);
	};