Thanks. It's a bit confusing when there seem to be so many api's ( ubiquity, fuel, dom, maybe xpcom? ) and you don't know what to use. In this case it's just plain dom isn't it?
On Dec 30, 4:20 am, Blair McBride <[email protected]> wrote: > The Ubiquity API doesn't provide this, but the DOM API that Ubiquity > uses does. The key is selection.getRangeAt(x) - using different values > of x. selection.rangeCount has the number of ranges (areas that are > selected). So, assuming window is the content window: > > var selection = window.getSelection(); > var selectedTextParts = []; > for (var i = 0; i < selection.rangeCount; i++) { > var range = selection.getRangeAt(i); > selectedTextParts.push(range.toString()); > > } > > See here for more complex uses, like getting the DOM > nodes:https://ubiquity.mozilla.com/hg/ubiquity-firefox/file/tip/ubiquity/mo... > > - Blair > > On 30/12/09 2:14 AM, Adamantium wrote: > > > > > How would you do multiple selection in a text ( to be precise, > > selection done using ctrl-select) > > > -- > > > You received this message because you are subscribed to the Google Groups > > "ubiquity-firefox" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/ubiquity-firefox?hl=en. -- You received this message because you are subscribed to the Google Groups "ubiquity-firefox" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/ubiquity-firefox?hl=en.
