You are here

function wysiwyg_ckeditor_proxy_plugin_settings in Wysiwyg 5.2

Build a JS settings array for Drupal plugins loaded via the proxy plugin.

1 string reference to 'wysiwyg_ckeditor_proxy_plugin_settings'
wysiwyg_ckeditor_editor in editors/ckeditor.inc
Plugin implementation of hook_editor().

File

editors/ckeditor.inc, line 280
Editor integration functions for CKEditor.

Code

function wysiwyg_ckeditor_proxy_plugin_settings($editor, $profile, $plugins) {
  $settings = array();
  foreach ($plugins as $name => $plugin) {

    // Populate required plugin settings.
    $settings[$name] = $plugin['dialog settings'] + array(
      'title' => $plugin['title'],
      'icon' => base_path() . $plugin['icon path'] . '/' . $plugin['icon file'],
      'iconTitle' => $plugin['icon title'],
    );
    if (!empty($plugin['css path']) && !empty($plugin['css file'])) {
      $settings[$name]['css'] = base_path() . $plugin['css path'] . '/' . $plugin['css file'];
    }
  }
  return $settings;
}