I use document.execCommand to do the editor html inheritance problem

I use document.execCommand as the editor to insert the html element
, but when I wrap the line, I inherit the previous html element. I want another

.
let model = "<div class="box">

234

</div>" document.execCommand(https://segmentfault.com/ask"insertHTML", false, model);

for example, I insert a div. whose class is box. After a line break, a < div class="box" >

< / div > < / div >
is automatically generated. How can I add

to another line?
Apr.07,2021
Menu