javascript - createtextrange in IE11 -


i need little in creating textrange in ie 11. in previous ie have bit of code

var theselection  = document.selection.createrange(); --code works on text range because create range returns text range 

i understand ie11 no longer support selection , have use getselection. new code looks this

var theselection  = document.getselection().createrange(); --code works on text range because create range returns text range 

the problem having keep getting error says object not support method or property createrange. have tried this, gives me same error.

 var theselection  = document.getselection().tostring().createrange(); --code works on text range because create range returns text range 

any ideas?

actually, believe have need ...

document.selection.createrange() replaced document.getselection() ...

there note here ...

document.selection replaced window.getselection ...


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -