TextContextMenuProvider

Interface

Common
interface TextContextMenuProvider

The provider determines how the context menu is shown and its appearance.

The context menu can be customized by providing another implementation of this to LocalTextContextMenuDropdownProvider or LocalTextContextMenuToolbarProvider via a CompositionLocalProvider.

If you want to modify the contents of the context menu, see Modifier.appendTextContextMenuComponents and Modifier.filterTextContextMenuComponents

Functions

suspend fun showTextContextMenu(dataProvider: TextContextMenuDataProvider)

Shows the text context menu.

This function suspends until the context menu is closed. If the coroutine is cancelled, the context menu will be closed.

Parameters

dataProviderprovides the data necessary to show the text context menu.