Opened 11 years ago

Closed 11 years ago

#10111 closed Bug (invalid)

Trap the 'tab' key

Reported by: Nandini Jayabalan Owned by:
Priority: Normal Milestone:
Component: Core : Keystrokes Version: 3.3.1
Keywords: Cc:

Description

I have changed the behaviour of the 'tab key by using 'CKEDITOR.config.tabSpaces = 4;'

But I am unable to track the 'tab' keystroke for the character counter plugin that we developed inhouse

Change History (1)

comment:1 Changed 11 years ago by Jakub Ś

Keywords: TAB removed
Resolution: invalid
Status: newclosed

This isn't support site or forum but place for reporting bugs.

Please look for errors in your plugin's code as with this setting or wothout it tab key is being caught in CKE 3.x with key code 9:

				editor.on('pluginsLoaded', function(evt){//9
					evt.editor.on( 'contentDom', function( e )	{
						e.editor.document.on( 'keydown', function( event ) {
								attachOnKeydown( e.editor, event );
							} );						
											
						evt.editor.on( 'mode', function( e ) {
							if ( e.editor.mode != 'source' )
								return;

							e.editor.textarea.on( 'keydown', function( event ) {
								attachOnKeydown( e.editor, event );
							} );					
						});					
						function attachOnKeydown( editor, event ){		
							console.log(event.data.getKeystroke());
						}
					});
				});
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy