Search code examples
jqueryckeditor

How i can count the instance of ckeditor exist on webpage in javascript?


How i can count the instance of ckeditor exist on webpage in javascript ? can anyone show me sample code for that ?


Solution

  • function getNumberOfInstances(){
        var x = 0; // x is the number of instances
        for(var instances in CKEDITOR.instances){
            x ++;
        }
        return x;
    }