I am trying to use as an input (in the sense of ) to edit content and post the content onto the MySQL backend server by pressing the Save button. I prefer to retain the use because I want to the content to be style-formattable (bold, italic, bulleted lists, etc.). However, I am unable to do so unless I change to , which means I cannot keep the formatting options.
Below is my code:
<div className="final-chunk-content" contenteditable="true" onChange={(e) => setContent(e.target.value)}></div>
<button className="save-button" onClick={handleClickSaveFinalChunk}>Save</button>
Are there ways to retain while retaining the function of ?