Re: wanted: insert templates

Christian Stocker <[email protected]> Mon, 01 Nov 2004 16:07:19 +0100
Newsgroups gmane.editors.bitflux.general
Message-ID <[email protected]>

On 1.11.2004 16:03 Uhr, Patrick Kollitsch wrote:
> hi
> 
> Christian Stocker wrote:
> 
>>
>>
>> On 1.11.2004 14:23 Uhr, Patrick Kollitsch wrote:
>>
>>> hi,
>>>
>>> one of the most wanted features our users request is the possibility 
>>> to define buttons, which insert a kind of template (like <div 
>>> id="bla"><h1>header</h1><p>content</p></div>) for easy implementation 
>>> of recurring contents/styles. do you see a possibility to implement 
>>> such templates via a eDomEvent?
>>
>>
>>
>> This feature is on the Todo list, should hopefully be in 1.1 or 
>> certainly 1.2
>>
>> There's a function called bxe_insertContent() which exactly would do 
>> this. It's just a matter of a nice GUI and a way to configure it, to 
>> make it really work...
> 
> 
> i tried the following (bxeLoader.js/function xml_loaded(xmldoc)):
> document.eDOMaddEventListener("InsertBox",bxe_insertContent('<box><titel>titel</titel><xhtml:p>inhalt</xhtml:p></box>'),false); 

the second argument is the name of the callback function.

so

function bxeInsertBox () {
bxe_insertContent('<box><titel>titel</titel><xhtml:p>inhalt</xhtml:p></box>')
}

document.eDOMaddEventListener("InsertBox","bxeInsertBox",false);

could eventually work

Try adding an alert("foobar"); to the bxeInsertBox function to see, if 
it actually works ;)

chregu





> with a button defined to take action="InsertBox" - but it did not work 
> (no error, no reaction). how does the function has to be called?
> 
> thanks
> patrick
> 
>>
>> 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-users mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-users