imnapo / react-native-cn-richtext-editor

Richtext editor for react native
MIT License
218 stars 113 forks source link

react-native-web support #64

Open kations opened 5 years ago

kations commented 5 years ago

Is it possible to gain compatibility with react-native-web?

At the moment it just renders a textarea with [object Object] as value, the problem seems to be rendering children in textarea. Or do you have a recommendation for a web editor who works nice with the html output?

Thanks for the great work

imnapo commented 5 years ago

Hi @kations, l haven’t used react-native-web and I don’t know lot about it. But I think our package shouldn’t work properly with it as we have lot of platform specific code for android and iOS. We will try to study more about compatibility with it in near future for sure. And I think you may be right, this package creates text elements inside textarea to enable styling (as react native let us do this) and I’m not sure react-native-web can translate it to right web html elements. Also be aware that we keep value of the editor in a JavaScript array but you may easily convert it to html using our converter functions listed in documents.