0

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});}}
    />
  • not to discourage you or anything but creating editors using contenteditable from scratch is a really daunting task and consumes way too much time. I would suggest you look into some open source editors that are already available rather than dealing with the mess that content editable is. – Yang K Jan 06 '19 at 06:37
  • Thanks for your suggestion @YangK . Can you suggest me some open source editors? – Indranil Talukdar Jan 06 '19 at 13:20
  • https://stackoverflow.com/questions/6756407/what-contenteditable-editors-are-there – Yang K Jan 07 '19 at 06:16

0 Answers0