Skip to content

Commit

Permalink
Fixed possible issue when having multiple ckEditor instance on the sa…
Browse files Browse the repository at this point in the history
…me page
  • Loading branch information
Vincent Jousse committed Mar 6, 2010
1 parent 154d5f0 commit 3b91b36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web/js/front/widgetForm.js
@@ -1,16 +1,16 @@
$.fn.dmWidgetContentCkEditorForm = function(widget)
{

var self = this, $textarea = self.find('textarea.dm_ckeditor'), editor;


//Kill all existing instances before loading
//ckeditor again or it will not work with ajax request
for(var name in CKEDITOR.instances)
if ( $textarea.attr('id') in CKEDITOR.instances )
{
CKEDITOR.remove(CKEDITOR.instances[name]);
CKEDITOR.remove(CKEDITOR.instances[$textarea.attr('id')]);
}


var self = this, $textarea = self.find('textarea.dm_ckeditor'), editor;

$textarea.ckeditor(function()
{
$.dbg(this);
Expand Down

0 comments on commit 3b91b36

Please sign in to comment.