I'm using React/MobX. Chrome is the target browser. I have a contenteditable div and the spellcheck button, which simply changes the spellcheck attribute of the contenteditable div. Once it's set to true, the whole text is checked and all the mistakes are underlined. But if it's set to false, these underlined words are still underlined. The only way to remove underline is to start editing the corresponding word. How to remove them by the button click?
Update: actually I'm using react-quill and I don't control the editable container in the React way. Quill gives access to the corresponding contenteditable element so I manually change the attribute