You are here

function tinymce_wysiwyg_settings in TinyMCE 7

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

1 call to tinymce_wysiwyg_settings()
tinymce_wysiwyg_plugin_settings in includes/tinymce_extended.inc
Build a JS settings array of native external plugins that need to be loaded separately.
1 string reference to 'tinymce_wysiwyg_settings'
tinymce_tinymce_extended_editor in includes/tinymce_extended.inc
Plugin implementation of hook_editor().

File

includes/tinymce_extended.inc, line 64
Editor integration functions for TinyMCE.

Code

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

  // Merge in defaults.
  $tinymce_editor_info = tinymce_editor_info();
  $config = (array) $config + $tinymce_editor_info['tinymce']['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 tinymce_add_settings($editor, $format, $existing_settings);
}