Skip to content

Commit dfd6223

Browse files
author
Joeri Verdeyen
committed
Only destroy CKEDITOR with class = rich_editor
1 parent 9297966 commit dfd6223

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
@@ -99,9 +99,12 @@
9999
}
100100
101101
function disableCKEditors(){
102-
for ( instance in CKEDITOR.instances ){
103-
CKEDITOR.instances[instance].destroy();
104-
}
102+
for ( instance in CKEDITOR.instances ){
103+
if ($('#' + CKEDITOR.instances[instance].name).hasClass('rich_editor')) {
104+
CKEDITOR.instances[instance].destroy();
105+
106+
}
107+
}
105108
}
106109
107110
function enableCKEditors(){

0 commit comments

Comments
 (0)