Skip to main content
Version: 2023.3

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
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
widthintegerWidth of the textarea in pixel
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

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