Opened 3 years ago

Closed 3 years ago

#14771 closed Bug (invalid)

ev.editor.setKeystroke(CKEDITOR.CTRL + 86, 'pastetext') pasting text into window BEFORE dialog has opened.

Reported by: ukjezza Owned by:
Priority: Normal Milestone:
Component: General Version: 4.3.3
Keywords: Cc:

Description

I'm trying to intercept the CTRL + V keystrokes to open the ckeditor default 'Paste' dialog window.

Steps to reproduce

$(window).load(function() {

CKEDITOR.on('instanceReady', function (ev) {

ev.editor.setKeystroke(CKEDITOR.CTRL + 86, 'pastetext');

});

}

  1. CTRL + V paste into main editor window

Expected result

'Paste' dialog should pop up ready for text to be pasted into it.

Actual result

Text is pasted into the editor BEFORE 'Paste' dialog has opened.

(Using ckeditor version 4.3.3 in Chrome Version 51.0.2704.106)

Change History (1)

comment:1 Changed 3 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

I'm sorry but this is a place for reporting CKEditor bugs and not place for seeking advice or support.

If you have CKEditor license, please contact our support team. You also can ask your implementation questions at Stack Overflow.

What you are trying to do can be done with API but you need to focus on key event.

var editor = CKEDITOR.replace( 'editor1', {});	

	editor.on( 'key', function( evt ) {
		var keyCode = evt.data.keyCode;
			if (  keyCode == CKEDITOR.CTRL + 86 ) {// Ctrl+V
				editor.execCommand( 'pastetext' );
				evt.cancel();
		}
	}, null, null, 1 ); // We need a high priority to be before widget event.
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy