react-native-rich-editor icon indicating copy to clipboard operation
react-native-rich-editor copied to clipboard

Link click handler

Open kosbog opened this issue 3 years ago • 7 comments

Issue https://github.com/wxik/react-native-rich-editor/issues/187

kosbog avatar Apr 19 '22 13:04 kosbog

@stulip check PR, please.

kosbog avatar Apr 28 '22 09:04 kosbog

@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 avatar Apr 28 '22 21:04 jakehasler

@jakehasler super. Just let me know!

kosbog avatar Apr 29 '22 13:04 kosbog

@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.

image image

jakehasler avatar Apr 29 '22 18:04 jakehasler

@jakehasler ah, my stupid mistake... Fixed.

kosbog avatar May 02 '22 10:05 kosbog

@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: image 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 avatar May 02 '22 17:05 jakehasler

@jakehasler super! Write when you merge it, please.

kosbog avatar May 05 '22 08:05 kosbog

Thank you, the code is conflict, please make a correction before submitting it

stulip avatar Apr 03 '23 10:04 stulip

Update a branch.

kosbog avatar Apr 19 '23 08:04 kosbog