Eliminating text resizing
26/04/2016
![](/sites/default/files/styles/ps_article_image/public/2016-11/ipad-606764_640.jpg?itok=JgO8FS41)
Eliminate the possibility of completely resizing the texts. Take out the “grippies” of Drupal just like the resizing of the html component.
PHP code:
/**
* Implements hook_element_info_alter().
*/
function MYMODULE_element_info_alter(&$types) {
$types['textarea']['#process'][] = 'MYMODULE_process_textarea';
}
/**
* Custom process function to disable "grippies" on textareas.
*/
function MYMODULE_process_textarea($element) {
$element['#resizable'] = FALSE;
return $element;
}
CSS code:
textarea {
resize: none;
}