function editor_element_info_alter in Editor 7
Implements hook_element_info_alter().
File
- ./
editor.module, line 224 - Allows rich text fields to be edited using WYSIWYG client-side editors.
Code
function editor_element_info_alter(&$type) {
// Replace the default text_format #process function in order to add support
// for editors.
if (isset($type['text_format'])) {
// Locate the default file.module #process function.
$filter_process_format_location = array_search('filter_process_format', $type['text_format']['#process']);
// Replace it with the editor.module #process function.
array_splice($type['text_format']['#process'], $filter_process_format_location, 1, 'editor_process_format');
}
// Editor drops textarea.js in favor of CSS3 resizing of textareas.
// Change the default value of #resizeable for textarea accordingly.
if (isset($type['textarea'])) {
$type['textarea']['#resizable'] = 'vertical';
}
}