Skip to content

Commit 381cc09

Browse files
author
jockri
committed
Merge pull request #122 from jverdeyen/feature/ckeditor-destroy-fix
Only destroy CKEDITOR with class = rich_editor
2 parents 0f8a905 + dfd6223 commit 381cc09

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Resources/views/PagePartAdminTwigExtension/widget.html.twig

+6-3
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@
100100
}
101101
102102
function disableCKEditors(){
103-
for ( instance in CKEDITOR.instances ){
104-
CKEDITOR.instances[instance].destroy();
105-
}
103+
for ( instance in CKEDITOR.instances ){
104+
if ($('#' + CKEDITOR.instances[instance].name).hasClass('rich_editor')) {
105+
CKEDITOR.instances[instance].destroy();
106+
107+
}
108+
}
106109
}
107110
108111
function enableCKEditors(){

0 commit comments

Comments
 (0)