Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serialize a DOM range

is there any standard/easy way to serialize a DOM Range (and the IE equivalent) with java script.

The motivation is to store the current selection for a document together with its HTML code.


I thought of using XPath for it, but before I start to reinventing the wheel maybe there is something already working available and I just haven't found it (best would be a jQuery based solution).

like image 482
Fionn Avatar asked Nov 05 '22 16:11

Fionn


1 Answers

I think I got the answer visit link below : Rangy, A cross-browser JavaScript range and selection library

like image 60
Ata Iravani Avatar answered Nov 12 '22 18:11

Ata Iravani