[Zope] Kupu: uncaught exception
Garito
garito at sistes.net
Wed Sep 3 03:07:09 EDT 2008
Hi!
Sorry for post this question on this list but I ask at kupu list (last
wednesday) without success (glups!)
Context:
Zope 2.7.8-final
Plone 2.0.5
Kupu 1.3.9 (the last tested version on 2.0.5)
This is the exact error (copied from firebug)
uncaught exception: [Exception... "Component returned failure code:
0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsISelection.getRangeAt]" nsresult:
"0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame ::
http://192.168.1.38:8110/esadir/kupuhelpers.js :: anonymous :: line 443"
data: no]
Line 0
When is the error raised:
I try to add a button that opens a popup box with some phonetics symbols
(you could see some buttons with this symbols and an edit box)
When you finish with the popup and push the ok button the error is raised
(when kupu try to add the text to the editor)
This error is only raised by Firefox (tested on 3.0.1 version on ubuntu and
windows)
On IE if you selected text all is ok but if there are no text selected the
phonetics text is inserted at the begining of the block (<p> or similar) not
at cursor position
This is the command I use to make this addition:
this.createFonetica = function(texte) {
var fonetica = this.editor.getInnerDocument().createElement('span');
fonetica.appendChild(this.editor.getInnerDocument().createTextNode(texte));
fonetica.className = 'transcripcioFonetica';
fonetica = this.editor.insertNodeAtSelection(fonetica, 1);
this.editor.logMessage(_('Fonetica inserted'));
this.editor.updateState();
return fonetica;
};
The problems seems to be the insertNodeAtSelection but no help at google (at
least I don't find no one)
Could someone point me to the correct solution?
Need more information?
Thank you so much!
--
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20080903/24b8d0f4/attachment.html
More information about the Zope
mailing list