wix-incubator / react-native-zss-rich-text-editor

React Native rich text editor based on ZSSRichTextEditor
Other
841 stars 310 forks source link

Not work in targetSdkVersion : 24 in android #89

Open boythan opened 6 years ago

boythan commented 6 years ago

work well in IOS and android with targetSdkVersion < 24 but targetSdkVersion >=24. Please give some suggestions

charpeni commented 6 years ago

I can't see any issues with targetSdkVersion 24.

What is the error you encountered?

boythan commented 6 years ago

@charpeni with targetSdkVersion 24, i can't do anything in RichTextEditor Screen, app get stuck.

leanhforevo commented 6 years ago

i same issue, ios work good but android with targetSdkVersion 25, can't do anything in RichTextEditor Screen

kaustubheksambekar commented 6 years ago

Any update on this? Facing the same issue on targetSdkVersion 27

rasselll commented 6 years ago

any update for targetSdkVersion 27?

charpeni commented 6 years ago

Oh I see, with targetSdkVersion 27 and probably from 24, the editor is really slow and we can't select anything because the focus is lost. Looks like it may be related to the scroll event, I'll try to look at this.

If you find anything, feel free to ping me.

charpeni commented 6 years ago

The error is located in getCaretYPosition:

https://github.com/wix/react-native-zss-rich-text-editor/blob/2cad3349dbac79713065eed33a211e67dab2f680/src/editor.html#L1027-L1038

Especially with range.collapse(false). I'm still trying to find a clean way to fix this.

rasselll commented 6 years ago

did you manage to find any solutions to this?

jeffie commented 6 years ago

@charpeni did you have a solution now? tks

boythan commented 6 years ago

@rasselll @jeffie i switched to use android native module lib and then map it to JS code. i used this lib in android native : https://github.com/wasabeef/richeditor-android

tzurae commented 6 years ago

targetSdkVersion 27, can't do anything ...

charpeni commented 6 years ago

A solution is available here: #115.

"react-native-zss-rich-text-editor": "https://github.com/charpeni/react-native-zss-rich-text-editor.git#fix-selection-focus",
tzurae commented 6 years ago

@charpeni It's still not working :(
but thank you : )

charpeni commented 6 years ago

@joey3060 have you rebuilt your app on Android? The fix is in editor.html and it needs to be copied by the gradle script. Otherwise, you'll get the old version.

tzurae commented 6 years ago

@charpeni it's working , thank you : )

jichangshuai commented 6 years ago

Hi,bro! I have followed the way as you say and in android 7.1.1 version, it , in fact, is fixed and worked normally, but in android 5.0.0, it cannot work that it can work before i have fixed as above. Can it fit just part of android version? Now, the problem is that if i fixed as you did, it can work well in android 7.1.1, but in android 5.0.0 it cannot work. If i don't fixed it followed you, it cannot work in android 7.1.1, but in android 5.0.0, it is normal.

unamed000 commented 6 years ago

I've the same issue for for android >8.0, the editor is very slow and i can't highlight the text. Does anyone have any fix for this yet?

mehthabt commented 4 years ago

yeah, there is time lag when make bold,italics,underline and even colors... I have made a fix by forking the repo. https://github.com/mehthabt/react-native-zss-rich-text-editor. just install this repo in your dependency.