It is possible to loop through all the CKEditor instances like:
for(var instanceName in CKEDITOR.instances) {
...
}
Some of the CKEditors are hidden in my case. So, how is it possible to loop through the visible CKEditors?
I ended up checking the visibility of the closest div
for(var instanceName in CKEDITOR.instances) {
if($("#"+instanceName).closest(".form-group").is(':visible')){
...
}
}