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
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
| Name | Description |
|---|---|
| EditableArea | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| Size | Gets or sets the size of the component. |
| Weight | Gets or sets the font weight of the component. |
| TextAlign | Gets or sets the text alignment of the component. |
| IsEditingMode | Returns a value indicating whether the component is editing mode. |
public TextSize Size { get ; set ; }Gets or sets the size of the component.
public TextWeight Weight { get ; set ; }Gets or sets the font weight of the component.
public TextAlign TextAlign { get ; set ; }Gets or sets the text alignment of the component.
Methods
| Name | Description |
|---|---|
| OnSave | Registers a callback invoked when the save event fires. |
| SetText | Sets the text of the component. |
| Render | Renders the component's root HTML element. |
| AsObservable | Returns the component's state as a(n) observable. |
public EditableArea OnSave(SaveEditHandler onSave)Registers a callback invoked when the save event fires.
public override HTMLElement Render()Renders the component's root HTML element.