I cannot get the CKEditor module to work with the Zurb theme. The CKEditor module works fine with other themes, just not with Zurb. I love the Zurb theme, but the CKEditor is a crucial element for my site, so it would be great if they played nice together.

This is the error I get according to Firebug when trying to load a Zurb-themed page with a CKEditor textarea on it:

TypeError: Drupal.settings.ckeditor is undefined
window.CKEDITOR_BASEPATH = Drupal.settings.ckeditor.editor_path;
(line 5 of ckeditor/includes/ckeditor.utils.js)

Comments

Issue summary:View changes

Clarify the bug

Okay, I figured it out. The CKEditor javascript files need to be called after the Zurb files or else CKEditor breaks. Zurb, by default, puts ALL the javascript files in the footer, including some after the CKEditor files. To fix the issue, I moved all the files except the CKEditor files to the header.

In my Zurb subtheme's template.php, I did this:

/**
* Implements hook_js_alter().
*/
function mytheme_js_alter(&$js) {
  // If CKEditor module exists, move everything except the CKEditor scripts to the header
  if (module_exists('ckeditor')) {
foreach ($js as $key => $js_script) {
if (!strstr($key, 'ckeditor')) {
$js[$key]['scope'] = 'header';
}
}
  }

Status:Active» Needs work

Nice work mamanerd! I'll make a note to add this nugget of info to the project page or documenation somewhere. Thanks for reporting the issue.

Component:Code» Documentation

change component

Status:Needs work» Fixed

Added a link on the project page https://drupal.org/project/zurb-foundation.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Issue summary:View changes

Further clarify the bug