How do I create a range object when I know just the character offsets?
问题 So I have a div that contains a block of text, previously the user has selected some text in this block and I created a range object from this selection. I stored the offset of the selected text's starting and ending points but I am having problems re-creating the range (so i can manipulate it). "quotables" is the div that holds all the text. I dont know what I am doing wrong. var theRange = rangy.createRange(); var node = $('.quotables').html(); theRange.setStart(node, 14); theRange.setEnd