Tesserae

EditableArea

Description

EditableArea is an inline editing component for multi-line text. It displays formatted text until the user enters edit mode, then swaps to a textarea and supports save or cancel behavior.

Use it when short display text is not enough and the user may need to edit notes, descriptions, or other paragraph-style content in place.

Usage

Create an EditableArea(...), optionally style it with text-formatting helpers, and register OnSave(...) to validate or persist edits.

API reference

class

EditableArea

public sealed class EditableArea : ComponentBase<EditableArea, HTMLTextAreaElement>, ITextFormating, IObservableComponent<string>

An inline-editable multi-line text surface that toggles between a read-only label and a textarea on click.

Constructors

Constructor
EditableArea
public EditableArea(string text = string.Empty)

Initializes a new instance of this class.

Properties

Property
EditableArea.Size
public TextSize Size { get ; set ; }

Gets or sets the size of the component.

Property
EditableArea.Weight
public TextWeight Weight { get ; set ; }

Gets or sets the font weight of the component.

Property
EditableArea.TextAlign
public TextAlign TextAlign { get ; set ; }

Gets or sets the text alignment of the component.

Property
EditableArea.IsEditingMode
public bool IsEditingMode { get ; set ; }

Returns a value indicating whether the component is editing mode.

Methods

Method
EditableArea.OnSave
public EditableArea OnSave(SaveEditHandler onSave)

Registers a callback invoked when the save event fires.

Method
EditableArea.SetText
public EditableArea SetText(string text)

Sets the text of the component.

Method
EditableArea.Render
public override HTMLElement Render()

Renders the component's root HTML element.

Method
EditableArea.AsObservable
public IObservable<string> AsObservable()

Returns the component's state as a(n) observable.

See also

Referenced by

© 2026 Tesserae. All rights reserved.