iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer
MIT License
596 stars 170 forks source link

Is it possible to detect long press on link? #233

Open Pranoy1c opened 4 weeks ago

Pranoy1c commented 4 weeks ago

Is it possible to detect long press on link? Something like onLinkLongPress?

sabidhasan commented 1 week ago

Is it possible to detect long press on link? Something like onLinkLongPress?

Hey @Pranoy1c I think you can use a custom rendering rule for your links and add an onLongPress handler there. https://github.com/iamacup/react-native-markdown-display/blob/fc9c5e1401729e30807a5781d8606e6a1054e158/src/lib/renderRules.js#L247

It doesn't look like the library by default exposes one though.