<commit_before><script type="text/javascript">
  $('quicktags').style.display = 'none';
  $('simple_editor').style.display = 'none';
  $('visual_editor').style.display = 'block';
  $('s').className = 'inactive';
  $('f').className = 'active';
  $('text_filter').value = 'none';
  html = $('article_body_and_extended').value;
  $('simple_editor').innerHTML = '';
  $('carousel-wrapper').style.display = 'none';
  
  if (CKEDITOR.instances.article__body_and_extended_editor &&
    typeof(CKEDITOR.instances.article__body_and_extended_editor) == 'object') {
      delete(CKEDITOR.instances.article__body_and_extended_editor);
    }
</script>
<%= ckeditor_textarea('article', 'body_and_extended', {:height => '300', :class => 'large'}) %>
<script type="text/javascript">
  content = CKEDITOR.instances.article__body_and_extended_editor.setData(html);
</script><commit_msg>Fixing editor switch when carousel wrapper is not loaded<commit_after><script type="text/javascript">
  $('quicktags').style.display = 'none';
  $('simple_editor').style.display = 'none';
  $('visual_editor').style.display = 'block';
  $('s').className = 'inactive';
  $('f').className = 'active';
  $('text_filter').value = 'none';
  html = $('article_body_and_extended').value;
  $('simple_editor').innerHTML = '';
  if ($('carousel-wrapper')) {
    $('carousel-wrapper').style.display = 'none';
  }

  if (CKEDITOR.instances.article__body_and_extended_editor &&
    typeof(CKEDITOR.instances.article__body_and_extended_editor) == 'object') {
      delete(CKEDITOR.instances.article__body_and_extended_editor);
    }
    alert("test avant");
</script>
<%= ckeditor_textarea('article', 'body_and_extended', {:height => '300', :class => 'large'}) %>
<script type="text/javascript">
  alert("test après");
  content = CKEDITOR.instances.article__body_and_extended_editor.setData(html);
</script>
{'fraction_non_alphanumeric': 0.19119226638023631, 'fraction_numerical': 0.00322234156820623, 'mean_word_length': 5.951492537313433, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6431480', 'n_tokens_mistral': 637, 'n_tokens_neox': 605, 'n_words': 85}