Fenda
Fenda

Reputation: 1385

Selection/Edit menu in React Native

In iOS it's possible to configure a Selection and Edit Menu. That looks like this: selection_menu

Also, the API is displayed here: https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/AddingCustomEditMenuItems/AddingCustomEditMenuItems.html

So is this possible on React Native? I am building a chat app where we need to allow copying messages and also custom menu items.

Upvotes: 8

Views: 1749

Answers (1)

Alexis
Alexis

Reputation: 16829

On iOS, customising the edit menu is achieved through UIMenuController. However if we look at the react-native repo the only occurrence of that class (until today) can be found in the RCTTextView class.

If you want to use it for other components you'll have to bridge it yourself.

Some 3rd party libraries exist.

Upvotes: 1

Related Questions