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.

Namespace
Tesserae
Inheritance
ComponentBase<EditableArea, HTMLTextAreaElement> → EditableArea
Implements
ITextFormating, IObservableComponent<string>

Constructors

NameDescription
EditableAreaInitializes a new instance of this class.
Constructor
EditableArea
public EditableArea(string text = string.Empty)

Initializes a new instance of this class.

Properties

NameDescription
SizeGets or sets the size of the component.
WeightGets or sets the font weight of the component.
TextAlignGets or sets the text alignment of the component.
IsEditingModeReturns a value indicating whether the component is editing mode.
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

NameDescription
OnSaveRegisters a callback invoked when the save event fires.
SetTextSets the text of the component.
RenderRenders the component's root HTML element.
AsObservableReturns the component's state as a(n) observable.
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

© 2026 Curiosity. All rights reserved.