-
Notifications
You must be signed in to change notification settings - Fork 1.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
TextInput: multiline rich content support #1023
Comments
Slate doesn't play so nice with mobile unfortunately. Same with DraftJS. The easiest solution is just wrap each one in it's own native renderer function that spits out the following: SubComponent
Web
Mobile
PS Really awesome library I'm using this to create cross platform apps (Web, Electron, React-Native) and it's going epic. Wish I could donate! |
@voidstarfire Thanks! How does React manage when a user edits the contentEditable content that is produced by components React renders? I heard that was one of the difficulties with contentEditable but haven't made time to experiment myself yet. Any more feedback you can include would be really helpful |
I'm playing with that just now. It seems to work really well so far. The Seems we have to create some sort of generator to filter out empty text components and fill in styled ones. Should work well with React-native-web. I will get back probably mid next week with my results :-) Here's some examples if you're interested. @necolas I'm actually creating a cross-platform native Markdown editor (Not just viewer) from scratch in React. Sub component.
Mobile
Desktop / Web
|
What does that mean? |
@necolas My bad I was speaking from a Markdown perspective mostly. Speaking from a |
@OllyDixon How is the development going? |
@shakeabi I'm using a library called Quill, worked great for mobile and web :-) |
@OllyDixon How are you using quilljs in native cuz there's no native supported quill yet, right? (If webview, then though it may work for various devices, it's still not purely native and can have unexpected behaviour) |
@shakeabi there was no native solution that included an editor. |
@OllyDixon It's not that difficult to make a simple native rich text editor. My (partial) solution includes using nested inside . However, react-native-web doesn't support this as it renders either textarea or input tags (neither of them supports children tags). #1380: I've discussed the same in this issue. A probable solution would be to replace the TextInput version (textarea or input) react-native-web to content-editable divs. |
@shakeabi yes I discovered this as well. I no longer do React Native anymore though. Flutter is much better :-) |
Multiline
TextInput
in React Native supports components as children. Along with #795 and #793, this may require switching tocontentEditable
for themultiline
implementation, if not the single-line input.The text was updated successfully, but these errors were encountered: