我有一个 KendoEditor 如下:
editor.component.html 包括:
<textarea>
kendoTextArea
name="editText"
(document:click)="onUserClick()"
(keydown)="onKeyDown()"
(keyup)="onKeyUp()"
#textAreaEditor
value ="{{value}}">
</textarea>
editor.component.ts 包括:
kendo
.jQuery(textAreaEditor.nativeElement)
.kendoEditor({
resizable: {
content: true,
toolbar: false,
},
paste: (e: any) => {
console.log("paste");
},
select: (e: Event) => {
console.log('select event fired!');
},
tools: [
'bold',
'italic',
'underline',
'justifyLeft',
'justifyCenter',
'justifyRight',
'justifyFull',
],
change: (args) => {
console.log('value Changed');
},
})
.data('kendoEditor');
const editor = kendo
.jQuery(textAreaEditor.nativeElement)
.data('kendoEditor');
kendo
.jQuery(editor.window).bind('keydown', onKeyDown());
kendo
.jQuery(editor.window).bind('keyup', onKeyUp());
我需要能够捕获退格键,但上面的代码不起作用,并且没有将退格键捕获为 KeyDown 事件的一部分。你能帮忙吗?