Crates.io | rat-text |
lib.rs | rat-text |
version | 0.29.1 |
source | src |
created_at | 2024-08-25 16:16:14.646428 |
updated_at | 2024-12-12 16:48:00.366731 |
description | ratatui text input widgets |
homepage | |
repository | https://github.com/thscharler/rat-text |
max_upload_size | |
id | 1351217 |
size | 615,275 |
This crate is a part of rat-salsa.
For examples see rat-text GitHub or an extended example mdedit.rs
in
rat-salsa GitHub.
Features for all widgets:
Undo/redo
Sync another widget
Support double-width characters
Range based text styling
Clipboard trait to link to some clipboard implementation.
There is no general solution for clipboards but this way you can integrate one of the many crates that try to do this.
Builtin scrolling. Uses rat-scrolled.
Lots of text manipulation functions.
Single line text input widget.
Textarea with tendencies to being an editor.
Uses Rope backend for a good editing experience for longer text. Starts lagging a bit if you have more than 10,000 style ranges or so (wip).
There is an extended example mdedit.rs
for TextArea in
rat-salsa
Single line text input with a text-mask for allowed input.
Nice to have for structured text input.
The widgets
use this as base.
DateInput with chrono format patterns.
NumberInput with format_num_pattern backend. A bit similar to javas DecimalFormat.
Line numbers widget that can be combined with TextArea.