iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer
MIT License
604 stars 172 forks source link

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

Open Pranoy1c opened 1 month ago

Pranoy1c commented 1 month ago

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

sabidhasan commented 1 month 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.