Charles Manske wrote:
> 
> 
> Brendan Eich wrote:
> 
>> Mike Lee wrote:
>>
>>> Hi
>>>
>>> I overloaded a ActionListener in mozilla somthing like
>>>
>>> var blahListener =
>>> {
>>>   WillInsertNode: function(...) {
>>>   },
>>>   DidInserNode: function(...) {
>>>   },
>>>   ....
>>> }
>>>
>>> I dont seem to be able to access a global object within the functions.
>>> Say if I have
>>>
>>> var gObject = document.getElementById('foo');
>>>
>>> I can't use the gObject within WillInsertNode for example? Any work 
>>> solutions or workarounds? 
>>
>>
> Did you get an answer yet? This really is a general JS question that 
> Brendan could have answered! Nothing special about it being in editor! I 
> can't see why what you did shouldn't work.
> 

No, but I was able to fine tune the problem down to the nsISelection 
object. For some reason the selection of the editor is lost prior to 
entering the nsIEditActionListener instance. The position is correct, 
but the range disappeared. So I can not get the selection of the editor 
from within the nsIEditActionListener instance. Is this by design or bug?

I need this so I can drag and drop a url from a browser and replace the 
text description with the current selection.

Thanks

-- 
Mike Lee
Weblog: http://www.exitspace.net/mike


Reply via email to