I am familiar with inserting text nodes after or before a given reference node. But, I would like to know how to insert a tag between text in a given node. For example,
Before insertion: <p>Lorem dolor</p>
After insertion: <p>Lorem <span>ipsum</span> dolor</p>
The span node must be inserted after N characters (I don't need user's cursor selection position) within another another node. Is that possible?