I use code suggested by http://drupal.org/node/1145132#comment-5601364 to disable autoload of ckeditor on few textareas.
But after adding new entity to the form via ajax (>Add new item< button) on all textarea the ckeditor get enabled, which causes the browser to hang for seconds on big forms. Any idea how to solve this?

Also if certain ckeditor are disabled vie the >Switch to plain text editor< link they will get re-enabled after adding new item to the form via ajax.

Comments

mkesicki’s picture

Thank you for noticing this. We try check and fix this as soon as possible.

e5sego’s picture

Remark:
setting the autostart values to false or 'undefined' using hook_js_alter() does not disable ckeditor autostart. Just removing them does it, with the behavior descriped above.

jQuery.extend(Drupal.settings, (...) "autostart":{"edit-field-somefield-und-0-value":false} (...) )

PHP-alternative to disable ckeditor on each field with machine name starting with "somefield":

function mymodule_js_alter(&$js) {
  foreach($js['settings']['data'] as &$item) {
    if (isset($item['ckeditor']['autostart'])) {
      list($field, $val) = each($item['ckeditor']['autostart']);
      if (strpos($field, 'edit-field-somefield') !== false) {
        //$item['ckeditor']['autostart'][$field] = false; /* don't work */'
        unset($item['ckeditor']['autostart']);
      }
    }
  }
}
mkesicki’s picture

@e5sego,
thank you for information and code sample.