You are here

function bueditor_settle in BUEditor 5

Same name and namespace in other branches
  1. 6.2 bueditor.module \bueditor_settle()
  2. 6 bueditor.module \bueditor_settle()
  3. 7 bueditor.module \bueditor_settle()

Include necessary js and css files for editor settlement.

2 calls to bueditor_settle()
bueditor_get_form_editor in ./bueditor.module
Editor form processed.
bueditor_textarea in ./bueditor.module
Integrate the editor into textareas.

File

./bueditor.module, line 502

Code

function bueditor_settle($editor) {
  if ($editor->eid && count($buttons = bueditor_buttons_processed($editor->eid))) {
    $dir = drupal_get_path('module', 'bueditor');
    drupal_add_css($dir . '/bueditor.css');
    drupal_add_js($dir . '/bueditor.js');
    bueditor_js_buttons($dir, $buttons);
    bueditor_js_library($dir . '/library');

    //load common js files.
    if (is_dir($edir = $dir . '/library/' . $editor->name)) {
      bueditor_js_library($edir);

      //load editor specific js files.
    }
    return TRUE;
  }
  return FALSE;
}