Function

insertTextAtCursor

Action to insert text into this node at the current cursor position, or replacing the selection if text is selected.

insertTextAtCursor

Source set: Common
public fun SemanticsPropertyReceiver.insertTextAtCursor(
    label: String? = null,
    action: ((AnnotatedString) -> Boolean)?,
): Unit

Action to insert text into this node at the current cursor position, or replacing the selection if text is selected.

Expected to be used on editable text fields.

Parameters

label Optional label for this action.
action Action to be performed when SemanticsActions.InsertTextAtCursor is called.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: