Raxol.Components.Input.TextInput.Manipulation (Raxol v0.3.0)

View Source

Handles text manipulation operations for the TextInput component. This includes inserting, deleting, and pasting text.

Summary

Functions

Deletes the character before the cursor.

Deletes a character forward from the current cursor position.

Deletes the selected text and updates the cursor position.

Inserts a character at the current cursor position.

Pastes text at the specified position, optionally replacing selected text.

Functions

delete_char_backward(state)

Deletes the character before the cursor.

delete_char_forward(state)

Deletes a character forward from the current cursor position.

delete_selected_text(state, start, len)

Deletes the selected text and updates the cursor position.

insert_char(state, char)

Inserts a character at the current cursor position.

paste_at_position(state, text, position, selection_len)

Pastes text at the specified position, optionally replacing selected text.