text: Q:
  
  Ckeditor getData of all instance which id begin by "content_"
  
  I want to getData() of all CKEditor instances in my page which their id begin by "desccription_" to put these data in a array but it doesn't work, this is my code:
  var tab_desc = new Array();
  $('#bloc_etapes fieldset').each(function(index)
  {       
      var desc_dyn = CKEDITOR.instances[id^="description_"].getData();
      //var desc_dyn = $('#desc_etape'+(index+1)).val();  -------------------------ok with textarea only(without replacing them by CKE)
      tab_desc.push(desc_dyn);
  });
  
  if somebody have the solution i will be gratefull to him! 
  
  A:
  
  var tab_desc = [];
  for (var i in CKEDITOR.instances) {
      if (i.indexOf('description_') == 0) {
          tab_desc.push(CKEDITOR.instances[i].getData());
      }
  }
  
  UPDATE: To use textareas without id/name, instantiate them using themselves as DOM elements like this:
  $('textarea').each(function() {
      CKEDITOR.replace(this);
  });
  
  Then, each instance will be named editor1, editor2 and so on.
  UPDATE2: To get data from CKEditor instances whose original textareas have a class named 'my_custom_class', use this:
  for (var i in CKEDITOR.instances) {
      if (CKEDITOR.instances[i].element.$.classList.contains('my_custom_class')) {
          console.log(CKEDITOR.instances[i].getData());
      }
  }
  
  