Hi all,
I'm trying to create a plugin for jQuery that willlet you edit text in an
iFrame like it was a text processor, but I need to work with ranges and
selections and, while this is extremely easy with W3C compliant browsers,
Adapting the work to IE is a real pain. What I need to know is the
translation of this script:

var r = window.getSelection().getRangeAt(0);
var e = document.createElement("p");
r.surroundContents(e);

that changes this range:

foo<a>link</a>

into this:

<p>foo<a>link</a></p>

It seems like IE's "special" object TextRange does something similar, but it
only selects text, not the HTML tags that conform the document.

Any ideas? Thanks in advance.

Abel.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to