diff --git a/node-edit-protection.js b/node-edit-protection.js
index e11c31e..0863bf9 100755
--- a/node-edit-protection.js
+++ b/node-edit-protection.js
@@ -33,6 +33,16 @@
 
 			// Handle backbutton, exit etc.
 			window.onbeforeunload = function() {
+				//Add CKEditor module support (http://drupal.org/project/ckeditor)
+				if (typeof(CKEDITOR) != 'undefined' && typeof(CKEDITOR.instances) != 'undefined') {
+					for (var i in CKEDITOR.instances) {
+						if (CKEDITOR.instances[i].checkDirty()) {
+							edit = true;
+							break;
+						}
+					}
+				}
+				
 				if (edit && !click) {
 					click = false;
 					return (Drupal.t("You will lose all unsaved work."));
