Reputation: 21
i'm creating an editor using react-contenteditable. I want to underline the words which are not in my database dynamically while the user is typing. What is the proper way to do it? i want to create a spell correction app.
<ContentEditable
id="ContentEditableId"
//onClick={elem => this.editableClick(elem)}
className={"editableClass resultContainer"}
html={this.state.html} // innerHTML of the editable div
disabled={false} // use true to disable edition
onChange={this.handleContentChange} //handle innerHTML change
//tagName={"pre"}
//onMouseUp={() => {rangy.getSelection().expand("word", { trim: true});}}
/>
Upvotes: 0
Views: 285