This is more like a doubt. I was trying to add HTML markup text directly into the editor, then It was getting converted to a text with escaped sequences. Could someone please help me if there is any way to keep it as it is.
Example:
Input:
<b>REACT-QUILL</b>
Output:
<b>REACT-QUILL</b>
Required Output:
REACT-QUILL
<ReactQuill
placeholder="Enter summary"
value={description.summary}
onChange={this.onTextEditorChange.bind(this, "description.summary")}
/>
Then in OnChange, I am saving the content.
Then while printing the saved data I am doing this:
createMarkup() {
let { html } = this.props;
return { __html: html };
}
render() {
return (
<span dangerouslySetInnerHTML={this.createMarkup()}/>
);
}
Kindly help me. The when HTML markup is entered, it gets saved escape sequences in props.