Back to API Reference
Class
NativeTextContextMenu
sealed
Inherits:SelectableEntity
Implements:ITextContextMenu
Presents the platform's own text edit menu: the floating selection toolbar on Android and the edit menu on iOS, each drawn, styled, ordered, localized, positioned and animated by the system.
Remarks
The menu carries the standard commands the current ContextMenuCapabilities allow, and every command the user invokes is routed back through the presenter — the field that showed the menu — so the platform UI performs UniText's own cut, copy, paste and select-all rather than the system's idea of them. It anchors to the selection rather than to a single point: the whole selection box (
TryGetSelectionScreenRect) is handed to the system, which then places the menu clear of the selected text the way it does in every other app. A collapsed selection anchors at the caret point the caller passed. The system menu exists on Android 6.0 and iOS 13 and later; iOS 16 and later present it through the edit-menu interaction that replaced the older menu controller. Elsewhere — every other platform, the Editor, and older devices — there is no system menu to present and this entity shows nothing; assign PrefabTextContextMenu for a presentation that exists everywhere.