This is perhaps the first time someone has suggested a legitimate use of this functionality. Congratulations!
But to answer your question, you can kind of cheat here. If you compare Utils.getSelection() to directObject.text, and they're the same, then you know its from a selection. - Blair On 19/02/2009 5:08 AM, psargaco wrote: > There's another very simple improvement I'd like to add to the email > command which is to use quotes in the body of the message only when > there's text selected from the page the user is trying to mail. The > problem is that I can't find a way to distinguish a directObject that > is part of the command from one that is obtained from the selected > text on the webpage. > > Here's a description of the intended behaviour: > 1. When the page has some selected text, then the email command shall > insert the quoted selected text in the body of the message. > > Ex.: email to paulo // having a portion of the webpage content > selected > > 2. When there is a text included in the command call, then the email > command shall insert the unquoted text in the body of the message > > Ex.: email Hey, take a look at this to paulo > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
