witten
/
luminotes
Archived
1
0
Fork 0

Fixed Editor.dirty() and Editor.mark_clean() to deal with divs in addition to iframes.

This commit is contained in:
Dan Helfman 2009-01-07 12:57:51 -08:00
parent b0202e785b
commit 19a24d9d78
1 changed files with 3 additions and 6 deletions

View File

@ -976,20 +976,17 @@ function normalize_html( html ) {
}
Editor.prototype.dirty = function () {
if ( !this.iframe || !this.document )
return false;
var original_html = normalize_html( this.initial_text )
var current_html = normalize_html( this.document.body.innerHTML )
var current_html = normalize_html( this.contents() );
if ( current_html == original_html )
if ( current_html == "" || current_html == original_html )
return false;
return true;
}
Editor.prototype.mark_clean = function () {
this.initial_text = this.document.body.innerHTML;
this.initial_text = this.contents();
}
Editor.prototype.mark_dirty = function () {