I am trying to find that something has changed in CKEditor using jquery but cannot make it work.
var isModified = false;
$('textarea,input').change(function(){
if(!isModified){
isModified = true;
}
});
$(".ckeditor").document.on('keydown', function() { isModified = true; });
window.onbeforeunload = function(){
$(".ckeditor").ckeditorGet().updateElement();
if(isModified){
return "Are you sure you want to leave page?";
}
};
Does anyone know what it takes to get it working on CKEditor 3.6.2? It works with all other form elements.
source
share