Hi Cezary,
At present our Document editor doesn’t insert non-breaking space on Ctrl + Shift + Space key. You can add custom logic to this key combination using
keyDown event of our DocumentEditor component. We have prepared a custom example to achieve your requirement of inserting non-breaking space on Ctrl + Shift + Space key. Please find the example from below link.
|
//Hooks the keyDown event for Document editor component to write custom logic.
this.container.documentEditor.keyDown = this.onKeyDown.bind(this); |
Please in the implementation of keyDown event handler.
|
onKeyDown(args: DocumentEditorKeyDownEventArgs): void {
let keyCode: number = args.event.which || args.event.keyCode;
let isCtrlKey: boolean = (args.event.ctrlKey || args.event.metaKey) ? true : ((keyCode === 17) ? true : false);
let isShiftKey: boolean = args.event.shiftKey ? args.event.shiftKey : ((keyCode === 16) ? true : false);
//Checks if the Ctrl, Shift and Space key are pressed.
if (isCtrlKey && isShiftKey && keyCode === 32) {
//Inserts a non-breaking space character at the cursor position
this.container.documentEditor.editor.insertText(String.fromCharCode(160));
args.isHandled = true;
}
} |
Please let us know if you have any other questions.
Regards,
Gunasekaran