I am facing some problems splitting tag contents at caret position. I can get the spliting index as well as the contents of the tag at caret position after spliting. The problem I am facing is shown below.
<html>
<div contenteditable="true">
<strong><em> Suppose this is the content inside tag </em></strong>
</div>
</html>
i have set the cursor between the word "content" and "inside". If i press a button now it should do something like below:
<html>
<div contenteditable="true">
<strong>
<em> Suppose this is the content </em>
</strong>
"""the cursor will be here"""
<strong>
<em>inside tag </em>
</strong>
</div>
</html>