Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: problems with including default-namespace-tags via button by insertElem: msg#00001

Subject: Re: problems with including default-namespace-tags via button by insertElement
Hi Patrick

On 11.10.2004 9:29 Uhr, Patrick Kollitsch wrote:
Hi,

i send this to the developerlist because it may belong to it because if its a bug the solution is appended.

Looks like a bug to me.

I applied your fix. I hope, it solves your problem.

I hope your "intimate hours" with BXE weren't too much of a pain ;)

thanks a lot for the solution

chregu



we wanted to include a button to insert one of our tags like the following:

<button name="Image" col="3" row="5" type="insertElement" ns="http://www.w3.org/1999/xhtml";>img</button>

we used our own tag "bild" and no namespace (tested too with an empty namespace). on every buttonclick we got the error "#tag1 is not allowed inside of #tag2". the schema said it is allowed, we know it is allowed, so we debugged the hole thing a little bit and found the following:

by loading the buttons on line 149 in bxeConfig.js there are the following lines

if (ns) {
    tmpArray['ns'] = ns;
}

we changed this to

if (ns !== null) {
    tmpArray['ns'] = ns;
}
else {
     tmpArray['ns'] = "";
}

and it worked for us.

the reason is, that on an empty namespace the editor has to think that the wanted namespace is the default namespace. the way it was written the debugger said that the namespace of the button ist "undefined" which is really no namespace we have and we found no position on which this undefained is internally transformed into the defaultnamespace.

maybe this is a bug or a wrong understanding of the system - you know it better. but as far as i unterstand bxe (and i had some very intimate hours the last weeks) with the line 149ff. which are current in it, its not possible to implement own tags via "insertElement".

have a nice day.

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  |  chregu@xxxxxxxxxx  |  gnupg-keyid 0x5CE1DECB
--
bx-editor-dev mailing list
bx-editor-dev@xxxxxxxxxxxxxxxx
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev



<Prev in Thread] Current Thread [Next in Thread>