javascript - How to get position of node in html? -


let's assume, there main root node inside of elements placed.

<div class="root">   <b>     <i>text       <span class="c">anotherpieceoftext       </span>it still</b>continues     </i> </div> 

by selection api can offset inside of 1 single node cursor begins , end!

but need transform data position of character of html inside root element wrap in text or other editing capabilities.

is there finished solution this? there way around without writing dom?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -