Initial value HTML
When I put HTML value, it return error: Cannot read property "length" of null
constructor(props) {
super(props);
this.state = {
selectedTag: 'body',
selectedStyles: [],
value: [getInitialObject()]
};
this.state.value = convertToObject(`
<h1>This HTML snippet is now rendered with native components !</h1>
<h2>Enjoy a webview-free and blazing fast application</h2>
<img src="https://i.imgur.com/dHLmxfO.jpg?2" />
<em style="textAlign: center;">Look at how happy this native cat is</em>`);
this.editor = null;
}
<CNRichTextEditor
ref={input => this.editor = input}
onSelectedTagChanged={this.onSelectedTagChanged}
onSelectedStyleChanged={this.onSelectedStyleChanged}
value={this.state.value}
style={{ backgroundColor: '#fff' }}
styleList={defaultStyles}
onValueChanged={this.onValueChanged}
/>

Update with PR #87
Issue must be solved by then.
I am also having this issue and it seems that the merged PR did not fix the issue? This package looks very promising and could be great but I have existing html (generated from web TinyMCE) that is throwing this error.
Hi @jacobSND, you may try CNEditor Component which accept a html string as initial value. You may install it using npm i react-native-cn-richtext-editor@next. For more information about how to use this pre-release you may read README in the next branch.