Skip to content

Commit

Permalink
Merge pull request #122 from jverdeyen/feature/ckeditor-destroy-fix
Browse files Browse the repository at this point in the history
Only destroy CKEDITOR with class = rich_editor
  • Loading branch information
jockri committed Jul 30, 2014
2 parents 0f8a905 + dfd6223 commit 381cc09
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Resources/views/PagePartAdminTwigExtension/widget.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,12 @@
}
function disableCKEditors(){
for ( instance in CKEDITOR.instances ){
CKEDITOR.instances[instance].destroy();
}
for ( instance in CKEDITOR.instances ){
if ($('#' + CKEDITOR.instances[instance].name).hasClass('rich_editor')) {
CKEDITOR.instances[instance].destroy();
}
}
}
function enableCKEditors(){
Expand Down

0 comments on commit 381cc09

Please sign in to comment.