Raxol.UI.Components.Input.MultiLineInput.TextHelper (Raxol v0.4.0)
View SourceHelper functions for text and line manipulation in MultiLineInput.
Summary
Functions
Deletes the currently selected text in the state, updating lines and value.
Inserts a character or codepoint at the current cursor position in the state, updating lines and value.
Converts a {row, col} tuple to a flat string index based on the provided lines.
Replaces text within a range (from start_pos_tuple to end_pos_tuple) with the given replacement string. Returns {new_full_text, replaced_text}.
Splits the given text into lines and applies the provided wrapping function to each line.
Splits the given text into lines, applying the specified wrapping mode (:none, :char, or :word).
Functions
Deletes the currently selected text in the state, updating lines and value.
Inserts a character or codepoint at the current cursor position in the state, updating lines and value.
Converts a {row, col} tuple to a flat string index based on the provided lines.
Replaces text within a range (from start_pos_tuple to end_pos_tuple) with the given replacement string. Returns {new_full_text, replaced_text}.
Splits the given text into lines and applies the provided wrapping function to each line.
Splits the given text into lines, applying the specified wrapping mode (:none, :char, or :word).