function wysiwyg_add_editor_settings in Wysiwyg 7.2
Same name and namespace in other branches
- 5.2 wysiwyg.module \wysiwyg_add_editor_settings()
- 5 wysiwyg.module \wysiwyg_add_editor_settings()
- 6.2 wysiwyg.module \wysiwyg_add_editor_settings()
- 6 wysiwyg.module \wysiwyg_add_editor_settings()
Add editor settings for a given input format.
1 call to wysiwyg_add_editor_settings()
- wysiwyg_pre_render_text_format in ./
wysiwyg.module - Process a text format widget to load and attach editors.
File
- ./
wysiwyg.module, line 488
Code
function wysiwyg_add_editor_settings($profile, $theme) {
static $formats = array();
if (!isset($formats[$profile->format])) {
$config = wysiwyg_get_editor_config($profile, $theme);
// drupal_to_js() does not properly convert numeric array keys, so we need
// to use a string instead of the format id.
if ($config) {
drupal_add_js(array(
'wysiwyg' => array(
'configs' => array(
$profile->editor => array(
'format' . $profile->format => $config,
),
),
),
), 'setting');
}
$formats[$profile->format] = TRUE;
}
}