imnapo / react-native-cn-richtext-editor

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

[fix] ref.focus undefined && newContents component undefined #87

Closed mqtik closed 5 years ago

mqtik commented 5 years ago

When we add/remove multiple images, the editor can't resolve if ref.focus is not defined. This also occurs when removing a image and adding another one, the newContents.component returns undefined.

mqtik commented 5 years ago

Oops! Didn't see that typo coming! Thanks!

I also added a commit to resolve images that don't have size properties. It gets the size property by using Image.getSize (as it does when inserting), and updates.

mqtik commented 5 years ago

This library is going to be amazing.

I'm testing it hard and will pull some more request!

mqtik commented 5 years ago

Also added conditionals on Convertors to avoid app freezes and still render the content if something goes wrong