I am familiar with inserting text nodes after or before a given node link. But I would like to know how to insert a tag between the 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 the position of the user's cursor selection) in another other node. Is it possible?
javascript dom
roobus
source share