react-native-rich-editor
react-native-rich-editor copied to clipboard
Link click handler
Issue https://github.com/wxik/react-native-rich-editor/issues/187
@stulip check PR, please.
@kosbog I was also just looking for this functionality. I've got my own fork in my project now with a few small things. I'm going to try merging this into mine and seeing how it works 👍
@jakehasler super. Just let me know!
@kosbog I did find a bug - that when the editor is set to disabled, it was executing the function but couldn't find the Linking variable in the scope. I haven't had a chance to look into it yet, but just an FYI.

@jakehasler ah, my stupid mistake... Fixed.
@kosbog I tested it out and it turned out that it was redirecting to the link right in the Webview itself, replacing the current editor content. So I adjusted my branch to have the following code:
Commit 1: https://github.com/jakehasler/react-native-rich-editor/commit/97a06439ec4f70447ab1a233b6cd4a12ce2bb7a3
Commit 2: https://github.com/jakehasler/react-native-rich-editor/commit/6f0580a4eb8ff16f716ec99a2f108f6f71002a9a
Also, I changed to onShouldStartLoadWithRequest to improve android compatibility based on this answer:
https://github.com/react-native-webview/react-native-webview/issues/1625#issuecomment-754566686
@jakehasler super! Write when you merge it, please.
Thank you, the code is conflict, please make a correction before submitting it
Update a branch.