javascript - How can I add a keyboard shortcut for my command in CKEditor 3? -


my plugin defines command paste data , generate link it.

is there way make keyboard shortcut it? can't find works.

i cannot this work.

running plugin definition doesn't work either

ckeditor.config.keystrokes.append([ckeditor.ctrl + ckeditor.shift + 108, 'pastelotuslink']); 

nor trying @ least bold work c-q:

editor.keystrokehandler.keystrokes[ckeditor.ctrl + 113, 'bold']; 

for 4.x, use editor.setkeystroke:

ckeditor.plugins.add( 'foo', {     init: function( editor ) {         editor.setkeystroke( ckeditor.ctrl + 81, 'bold' ); // ctrl+q     } } ); 

for 3.x:

ckeditor.plugins.add( 'foo', {     init: function( editor ) {         editor.on( 'instanceready', function( evt ) {             evt.removelistener();             this.keystrokehandler.keystrokes[ ckeditor.ctrl + 81 ] = 'bold'; // ctrl+q         } );     } } ); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -