Adding own Event Handlers (was: BXE Hackathon)

Christian Stocker <[email protected]> Mon, 15 Nov 2004 17:47:09 -0800
Newsgroups gmane.editors.bitflux.devel
Message-ID <[email protected]>
Hi

I added it. mode="append" doesn't work yet, but I'm not sure, if we need 
that at all. Maybe I'll add it, maybe not ;)

Here's the syntax in config.xml

<events>
     <event name="Exit">__exit</event>
</events>

would call the function __exit instead of the built in default event.

It's called in xml_config, where every js file defined in config.xml 
should have been loaded already

It's only in the trunk and I won't backport it to 1.0

chregu

On 15.11.2004 16:27 Uhr, Christian Stocker wrote:
> Hi again
> 
> One question :
> 
>>> 1. we wrote some own functions here for our buttonevents and have to 
>>> load them in bxeLoader.js in the function xml_loaded like this:
>>> document.eDOMaddEventListener("InsertLink2",bxe_InsertLink2,false);
> 
> 
> 
> I assume, you're overwriting the default EventListener? So, I'm thinking 
> about, if there's a custom event in config.xml, this overwrites the 
> default handler. Maybe adding an optional attribute, so you can add a 
> second one to the default one, if you'd like to do that:
> 
> <events>
>   <!-- This would overwrite the InsertLink event built in BXE -->
>   <event name="InsertLink">bxe_InsertLink2</event>
>   <!-- This would just add a second InsertLink event -->
>   <event name="InsertLink" mode="append">bxe_InsertLink2</event>
> </events>
> 
> Does that make sense?
> 
> By the way, you can already overwrite some custom behaviour when 
> inserting new elements. See the <callbacks> section in 
> examples/uni/config.xml. But there's still a need for 
> inserting/overwriting your own events, i agree with that
> 
> chregu
> 
> 
> 
>>
>>
>> Actually I wanted to implement that for ages ;) Shouldn't be a big 
>> deal and I'm trying to do that for 1.1
> 
> 
>>
>>>
>>> it would be a nice configuration function if there would be a 
>>> possibility to load such lines without modifying the core-files of 
>>> bitflux. maybe xml_loaded could load a kind of function xml_loaded2 
>>> (if it exists) which would have to be written by our extension.
>>>
>>> 2. Bitflux suggests to take firefox 0.8 ;) 1.0 works here.
>>> var bxe_notSupportedText = "Bitflux Editor only works with Mozilla >= 
>>> 1.4 / Firefox on any platform. \nCurrently we recommend Mozilla 1.6 
>>> or Firefox 0.8.";
>>
>>
>>
>> Oh. thanks for the hint. changed that to 1.7 and 1.0
>>
>> chregu
>>
>>>
>>> greetings
>>> patrick
>>
>>
>>
> 

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [email protected]  |  gnupg-keyid 0x5CE1DECB
-- 
bx-editor-dev mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev