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

getContentHtml not adding it to state on Android

udarts opened this issue · 0 comments

I am using the following code to get the html content and add it to the state.
Somehow this is working on iOS, but not on android.
On Android it returns empty.

This is the code I use:

constructor(props) {

    this.state = {
        bodyText: '',
    }
}
_saveAndToggle(visible) {
    this.getHTML();
    this.setState({ isModalVisible: visible });
};
async getHTML() {
    const contentHtml = await this.richtext.getContentHtml();
    this.setState({
        bodyText: contentHtml
    });
};

The _saveAndToggle is on an onPress of a button.

Any idea why this is not working?

I use version 1.1.0 of react-native-zss-rich-text-editor
react-native: 0.56

Cheers,
Stephan