Expand description
Text editors display a multi-line text input for text editing.
§Example
use iced::widget::text_editor;
struct State {
   content: text_editor::Content,
}
#[derive(Debug, Clone)]
enum Message {
    Edit(text_editor::Action)
}
fn view(state: &State) -> Element<'_, Message> {
    text_editor(&state.content)
        .placeholder("Type something here...")
        .on_action(Message::Edit)
        .into()
}
fn update(state: &mut State, message: Message) {
    match message {
        Message::Edit(action) => {
            state.content.perform(action);
        }
    }
}Structs§
- Content
 - The content of a 
TextEditor. - Id
 - The identifier of a 
TextEditor. - KeyPress
 - A key press.
 - State
 - The state of a 
TextEditor. - Style
 - The appearance of a text input.
 - Text
Editor  - A multi-line text input.
 
Enums§
- Action
 - An interaction with an 
Editor. - Binding
 - A binding to an action in the 
TextEditor. - Edit
 - An action that edits text.
 - Motion
 - A cursor movement.
 - Status
 - The possible status of a 
TextEditor. 
Traits§
- Catalog
 - The theme catalog of a 
TextEditor. 
Functions§
- default
 - The default style of a 
TextEditor. - focus
 - Produces a 
Taskthat focuses theTextEditorwith the givenId. 
Type Aliases§
- StyleFn
 - A styling function for a 
TextEditor.