[−][src]Trait kas::text::format::EditableText
Extension of FormattableText
allowing editing
Required methods
pub fn set_string(&mut self, string: String)
[src]
Set unformatted text
Existing contents and formatting are replaced entirely.
pub fn insert_char(&mut self, index: usize, c: char)
[src]
Insert a char
at the given position
Formatting is adjusted such that it still affects the same chars (i.e.
all formatting after index
is postponed by the length of the char).
pub fn replace_range(&mut self, range: Range<usize>, replace_with: &str)
[src]
Replace text at range
with replace_with
Formatting is adjusted such that it still affects the same chars.
Provided methods
pub fn swap_string(&mut self, string: &mut String)
[src]
Swap the contiguous unformatted text with another string
Any formatting present is removed.