diff --git a/src/Umbraco.Web.UI.Client/src/packages/property-editors/textarea/property-editor-ui-textarea.element.ts b/src/Umbraco.Web.UI.Client/src/packages/property-editors/textarea/property-editor-ui-textarea.element.ts index dec8fbc9b5..69ca92ee18 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/property-editors/textarea/property-editor-ui-textarea.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/property-editors/textarea/property-editor-ui-textarea.element.ts @@ -11,6 +11,15 @@ export class UmbPropertyEditorUITextareaElement extends UmbLitElement implements @property() value = ''; + /** + * Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content. + * @type {boolean} + * @attr + * @default false + */ + @property({ type: Boolean, reflect: true }) + readonly = false; + @state() private _maxChars?: number; @@ -52,7 +61,8 @@ export class UmbPropertyEditorUITextareaElement extends UmbLitElement implements .maxlength=${this._maxChars} .rows=${this._rows} .value=${this.value ?? ''} - @input=${this.#onInput}> + @input=${this.#onInput} + ?readonly=${this.readonly}> `; }