function Textarea::preRenderAttachments

Adds the textarea resize library.

File

core/lib/Drupal/Core/Render/Element/Textarea.php, line 57

Class

Textarea
Provides a form element for input of multiple-line text.

Namespace

Drupal\Core\Render\Element

Code

public static function preRenderAttachments($element) : array {
    $element['#attached']['library'][] = 'core/drupal.textarea-resize';
    return $element;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.