Skip to content

Commit

Permalink
Automatically assign id to iframe when textarea has own one, to simpl…
Browse files Browse the repository at this point in the history
…ify automated testing, closes #245
  • Loading branch information
akzhan committed Oct 10, 2011
1 parent 383b02f commit eae92f2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions jquery.wysiwyg.js
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,17 @@ html: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.o
this.editor.css("height", newY.toString() + "px");
}
}
/**
* Automagically add id to iframe if textarea has its own when possible
* ( http://github.com/akzhan/jwysiwyg/issues/245 )
*/
if (element.id) {
var proposedId = element.id + '-wysiwyg-iframe';
if (! document.getElementById(proposedId)) {
this.editor.attr('id', proposedId);
}
}

/**
* http://code.google.com/p/jwysiwyg/issues/detail?id=96
*/
Expand Down

0 comments on commit eae92f2

Please sign in to comment.