You are here

function ckeditor_wysiwyg_settings in CKEditor for WYSIWYG Module 7

Return JavaScript settings that should be passed to the WYSIWYG editor.

1 call to ckeditor_wysiwyg_settings()
ckeditor_wysiwyg_plugin_settings in includes/ckeditor_extended.inc
Build a JS settings array of native external plugins that need to be loaded separately.
1 string reference to 'ckeditor_wysiwyg_settings'
ckeditor_ckeditor_extended_editor in includes/ckeditor_extended.inc
Plugin implementation of hook_editor().

File

includes/ckeditor_extended.inc, line 64
Editor integration functions for CKEditor.

Code

function ckeditor_wysiwyg_settings($editor, $config, $theme) {

  // Merge in defaults.
  $ckeditor_editor_info = ckeditor_editor_info();
  $config = (array) $config + $ckeditor_editor_info['ckeditor']['default settings'];

  // Modify parameters to match Drupal 8 'js settings callback' as closely as
  // possible. WYSIWYG doesn't pass us the format information.
  $editor = (object) $editor;
  $editor->settings = $config;
  $format = (object) array();
  $existing_settings = array();
  return ckeditor_add_settings($editor, $format, $existing_settings);
}