Skip to main content
Version: 2024.4

Textarea Editable

General

The textarea editable is very similar to the Input editable, the only difference is multi-line support.

Configuration

NameTypeDescription
heightintegerHeight of the textarea in pixel
widthintegerWidth of the textarea in pixel
htmlspecialcharsbooleanSet to false to get the raw value without HTML special chars like & (default: true)
nl2brbooleanSet to true to get also breaks in frontend
placeholderstringA placeholder that is displayed when the field is empty
classstringA CSS class that is added to the surrounding container of this element in editmode
requiredbooleanset to true to make field value required for publish
defaultValuestringA default value for the available options.

Methods

NameReturnDescription
getData()arrayGet the value of the textarea
isEmpty()boolWhether the editable is empty or not.

Example

<p class="product-description">
{{ pimcore_textarea("product_description", {
"nl2br": true,
"height": 300,
"placeholder": "Product Description"
}) }}
</p>

In the editmode, you can see the textarea and the predefined placeholder.

Product description textarea - editmodeProduct description textarea - editmodeProduct description textarea - editmode