You are here

function tinymce_wysiwyg_proxy_plugin_settings in TinyMCE 7

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

1 string reference to 'tinymce_wysiwyg_proxy_plugin_settings'
tinymce_tinymce_extended_editor in includes/tinymce_extended.inc
Plugin implementation of hook_editor().

File

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

Code

function tinymce_wysiwyg_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'],
      // @todo These should only be set if the plugin defined them.
      'css' => base_path() . $plugin['css path'] . '/' . $plugin['css file'],
    );
  }
  return $settings;
}