Skip to main content

Module textarea

Module textarea 

Source
Available on crate feature textarea only.
Expand description

Multi-line text editing.

The app owns the Content and applies each Action in update:

use iced::widget::text_editor::{Action, Content};
use iced_cube::textarea;

#[derive(Debug, Clone)]
enum Message { Edit(Action) }

let content = Content::new();
let view: iced::Element<'_, Message> = textarea(&content)
    .placeholder("Write a note")
    .on_action(Message::Edit)
    .into();

Structs§

Content
The content of a TextEditor.
Textarea
A textarea builder. Convert it into an Element to render.

Enums§

Action
An interaction with an Editor.

Constants§

MIN_HEIGHT
Minimum height while the height is Length::Shrink, roughly three lines.

Functions§

style
The iced text editor style for a status, matching the input’s look.
textarea
Creates a textarea editing content.