function wysiwyg_add_editor_settings in Wysiwyg 6
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()
- 7.2 wysiwyg.module \wysiwyg_add_editor_settings()
Add editor settings for a given input format.
1 call to wysiwyg_add_editor_settings()
- wysiwyg_process_form in ./
wysiwyg.module - Process a textarea for Wysiwyg Editor.
File
- ./
wysiwyg.module, line 300 - Integrate client-side editors with Drupal.
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.
drupal_add_js(array(
'wysiwyg' => array(
'configs' => array(
$profile->editor => array(
'format' . $profile->format => $config,
),
),
),
), 'setting');
$formats[$profile->format] = TRUE;
}
}