Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting Selection to a Range



In Safari 1.3+, how do you convert a selection retrieved from window.getSelection() to a Range as specified in DOM 2 Ranges? In Mozilla you use getRangeAt() and in IE you use selection.createRange (). It seems that neither is supported with Safari. I was unable to find the W3C DOM way of doing it either. If I use createRange on the document I get an initialized textRange but not one that represents the selection. Safari documentation on this is sparse. Am I missing something obvious?

I realize this is similar to a post by Andrew Goodale on April 27th, but there were no replies. I was hoping someone at Apple could give us an example, tell us where to look, or tell us if this is currently supported? The contenteditible stuff is great but without this info, I am not going to be able to complete the Safari support.

- Paul _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webcore-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webcore-dev/email@hidden


This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.