I have a scenario and in that I want to append a closing tag then some other tag after that opening Tag of the first closed Tag.
For Example: I have this code <ins>123678</ins> and I want to append <b>46</b> in between 3 and 6. I tried this code while putting my cursor in between 3 and 6
document.execCommand('insertHTML',false,'</ins><b>45</b><ins>');
But it is not giving me desired output. I want my output like this
<ins>123</ins><b>45</b><ins>678</ins>
You could try to replace
<ins>123678</ins>
with
newHTML="<ins>123"+"<b>45</b>"+"678</ins>"
using jquery