Is there a way to ensure that the JavaScript function works properly even when using a text editor?
var editor = $('#CKEditor1').ckeditorGet();
editor.on("instanceReady", function () {
this.document.on("keydown", function (event) {
console.log(editor.checkDirty());
if (event.data.key == 32)
alert('space bar pressed');
});
});