rangy icon indicating copy to clipboard operation
rangy copied to clipboard

Expand does not exist on RangySelection. Nor does expand show in getSelection()

Open shivanikohlii opened this issue 7 years ago • 3 comments
trafficstars

I am trying to use var selTxt = rangy.getSelection().expand("word"). I get an error saying expand does not exist on rangySelection

shivanikohlii avatar Jun 18 '18 13:06 shivanikohlii

Make sure youre including the textrange library: rangy/lib/rangy-textrange.js

JaymevG avatar Oct 26 '18 14:10 JaymevG

I did have it included. It still doesn't work.

shivanikohlii avatar Oct 26 '18 17:10 shivanikohlii

seems to behave without the chaining:

let selection = rangy.getSelection();
selection.expand("word");

samburgers avatar Jan 20 '20 22:01 samburgers