-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP]Feature: Copy Markdown/HTML support #6537
Conversation
@parasharrajat the code looks fine, but a Unit test is failing. It would also be good to understand why |
Hey @Julesssss, I am still testing it. I will let you when ready. We don't need |
Blocker:
We need to handle paste just like we do on the Web and convert HTML to markdown. But there is no straight way to capture paste. All hacks. RN has not implemented this.
|
Ah, okay. Let's forget 2 for the moment.
Couldn't we detect paste manually by comparing the Clipboard data with the current TextInput value when the prop changes? It's definitely hacky though. |
Yeah, I am also leaning towards the same approach. I will update it. |
Update: I have hit a bottleneck. Changing the copied content before pasting on Native is really hacky. But we definitely need a way to do that. It could require making the composer Controlled. |
Ok, It seems that we can intercept the copy-past via making the Composer controlled. I have a doubt that if we are going to use a custom conversion function/lib it could be different from the text that we got from native TextInput as this comes from the native platform. I want to ask what should I use to convert the HTML to text. |
Damn, that's not ideal. I'm not exactly sure how to move forward here, so I would suggest that we take this to Slack to see if anyone else has an alternative suggestion here. With workarounds on top of workarounds, it might not be worth implementing this after all. |
Sure, I will discuss this as soon as possible. |
Sorry for the delay here. I am working on a major refactor for one of the old PR. I will get back to this next week after I am back from vacation. |
Opening a new PR. Changes here are unnecesary. |
Details
Fixed Issues
$ #5125
Tests | QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android
...on the way