From jordim at guellconsulting.com Wed Sep 3 08:46:35 2008 From: jordim at guellconsulting.com (Jordi Martinez) Date: Wed, 03 Sep 2008 08:46:35 +0200 Subject: [kupu-dev] Charmap: uncaught exception In-Reply-To: <48B57A74.2030201@guellconsulting.com> References: <48B566C7.8090004@guellconsulting.com> <48B57A74.2030201@guellconsulting.com> Message-ID: <48BE32CB.6020605@guellconsulting.com> Jordi Martinez escribi?: > Jordi Martinez escribi?: > >> Hi! >> If you remember, the last week I ask for how to create a kupu drawer >> >> Today I make this: >> >> at kupuploneinit.js I add this: >> >> var foneticatool = new FoneticaTool(kupu); >> kupu.registerTool('foneticatool', foneticatool); >> >> var foneticabutton = new KupuButton(prefix + 'button.kupu-fonetica', >> opendrawer('foneticadrawer')); >> kupu.registerTool('foneticabutton', foneticabutton); >> >> var foneticadrawer = new FoneticaDrawer(prefix + >> 'div.kupu-foneticadrawer', foneticatool); >> drawertool.registerDrawer(prefix + 'foneticadrawer', foneticadrawer , kupu); >> >> at kupu_wysiwyg_support this: >> >>
>>

Símbols >> fonètics

>>
>>
>>
>> >> >> >>
>>
>> >> at kupubasetools.js this: >> >> function FoneticaTool() { >> this.initialize = function(editor) { >> this.editor = editor >> this.editor.logMessage(_('Fonetica tool initialized')); >> }; >> >> this.createFonetica = function() { >> var fonetica = this.editor.getInnerDocument().createElement('span'); >> var text = this.editor.getInnerDocument().createTextNode('Holas'); >> fonetica.appendChild(text); >> fonetica.className = 'transcripcioFonetica'; >> fonetica = this.editor.insertNodeAtSelection(fonetica, 1); >> this.editor.logMessage(_('Fonetica inserted')); >> this.editor.updateState(); >> return fonetica; >> }; >> } >> >> and at kupudrawers.js this: >> >> function FoneticaDrawer(elementid, tool) { >> this.element = getFromSelector(elementid); >> this.tool = tool; >> this.save = function() { >> this.tool.createFonetica(); >> this.drawertool.closeDrawer(); >> } >> }; >> >> FoneticaDrawer.prototype = new Drawer; >> >> With this code all is ok except that when I push the ok button this >> exception is raised: >> >> 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] >> >> Could someone point me where is the error, please? >> >> Thanks a lot!!!! >> >> _______________________________________________ >> kupu-dev mailing list >> kupu-dev at codespeak.net >> http://codespeak.net/mailman/listinfo/kupu-dev >> >> >> > I make more test and this is my conclusions: > > With firefox the same, the reported error > > With IE7 if I select some text it works ok but if I don't select > anything it puts the code at first place in the current node > > But with a very similar creation code (in fact I copy the image tool > code) the image tool works ok > > Could the kupu maintainer helps me or point me to a good solution? > > I'm using Zope 2.7.8 final, Plone 2.0.5 and kupu 1.3.9 > > Thanks > _______________________________________________ > kupu-dev mailing list > kupu-dev at codespeak.net > http://codespeak.net/mailman/listinfo/kupu-dev > > Anyone could help with this issue? It's very important for me to solve this problem Thanks! From wouter at wvhconsulting.org Mon Sep 8 11:03:34 2008 From: wouter at wvhconsulting.org (Wouter Vanden Hove) Date: Mon, 08 Sep 2008 11:03:34 +0200 Subject: [kupu-dev] Fullscreen-mode: kupu 1.4.11 crashes Firefox2 Message-ID: Hi, I received some crash-reports from users. But I'm on Linux and Firefox3, so I cannot reproduce this myself directly. I witnessed following bug with kupu 1.4.11: On Windows and Firefox2, in kupu click the full-screen-button to go fullscreen, but clicking again to return to normal-size mode, Firefox crashes. It when started happening, after an upgrade from kupu 1.4.8 tot 1.4.11. It doesn't happen in 1.4.10. -- Greets, WouterVH From jasper at infrae.com Mon Sep 8 17:02:29 2008 From: jasper at infrae.com (Jasper Op de Coul) Date: Mon, 08 Sep 2008 17:02:29 +0200 Subject: [kupu-dev] List Re-ordering Tab focus problem fixed Message-ID: <48C53E85.9000802@infrae.com> Hi List, On previous versions of Firefox (<3), pressing the tab key would indent/outdent lists and paragraphs. In Firefox3 the tab key is used exclusively for focus. We had some requests to revert this behavior so pressing tab in the editor never changes focus, and performs the editor commands. Some interesting background reading: http://www.glazman.org/weblog/dotclear/index.php?post/2008/08/06/GRRRRRRR I added the following snippet to the bottom of the KupuEditor.prototype.afterInit function: doc.addEventListener('keydown', function(event){ if (window.event) event = window.event; if (event.keyCode == '9') { if (event.shiftKey){ kupu.execCommand('outdent'); }else{ kupu.execCommand('indent'); } event.preventDefault(); } }, true); I don't have checkin rights on codespeak, I fixed this in the Silva specific Kupu code for now, but I think more users would be interested in this. Kind regards, Jasper -- Jasper Op de Coul -- Infrae t +31 10 243 7051 -- http://infrae.com Hoevestraat 10 3033GC Rotterdam -- The Netherlands From duncan.booth at suttoncourtenay.org.uk Thu Sep 11 12:10:04 2008 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Thu, 11 Sep 2008 10:10:04 +0000 (UTC) Subject: [kupu-dev] List Re-ordering Tab focus problem fixed References: <48C53E85.9000802@infrae.com> Message-ID: Jasper Op de Coul wrote: > I don't have checkin rights on codespeak, I fixed this in the Silva > specific Kupu code for now, but I think more users would be interested > in this. > The Plone implementation already had code to ensure the tab key does focus switching in all browsers instead in indent/outdent. I did ask for feedback whether that was the desirable behaviour: so far as I can tell both behaviours annoy half the users. From duncan.booth at suttoncourtenay.org.uk Thu Sep 11 12:10:05 2008 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Thu, 11 Sep 2008 10:10:05 +0000 (UTC) Subject: [kupu-dev] Fullscreen-mode: kupu 1.4.11 crashes Firefox2 References: Message-ID: Wouter Vanden Hove wrote: > > Hi, > > I received some crash-reports from users. > But I'm on Linux and Firefox3, > so I cannot reproduce this myself directly. > I witnessed following bug with kupu 1.4.11: > > On Windows and Firefox2, > in kupu click the full-screen-button to go fullscreen, > but clicking again to return to normal-size mode, Firefox crashes. > > It when started happening, after an upgrade from kupu 1.4.8 tot 1.4.11. > It doesn't happen in 1.4.10. > I haven't yet tried to reproduce this, but sadly it won't suprise me. Some older versions of kupu+Firefox2+Windows also used to crash when toggling fullscreen mode. I think the problem is connected with the way that focus works asynchronously in Windows: if you step through the code with a debugger it will work fine, and if you remove the focus setting code it also works (but annoys people because the edit window loses focus on unzooming), and changing the order of the lines of code can also stop the crash. Can you make sure and file a bug in the Plone tracker: I'm hoping to find the time to blitz some of the current bugs in the very near future. From paulrivera22 at gmail.com Thu Sep 18 05:16:58 2008 From: paulrivera22 at gmail.com (Paul Rivera) Date: Thu, 18 Sep 2008 11:16:58 +0800 Subject: [kupu-dev] kupucontentfilters bug with empty text Message-ID: <8fbbf6ce0809172016g719fa229ue41f48ba5a79f1da@mail.gmail.com> Hi! I'm using kupu editor in myfaces tomahawk inputHtml component. I have one kupu html editor in my page and if I submit my page with that editor containing an empty string, kupu sets its content to #000000 on page reload. I've done some investigation and found out that kupucontentfilters.js confuses the attribute 'text' with 'textContent'. The 'text' attribute actually refers to the font-color, #000000, which is correct. But it should not be set as the body content. The body content should come from 'textContent' attribute. I've attached a patch for the latest development version here. I hope this helps. Best Regards, Paul Rivera -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20080918/625686c6/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: kupucontentfilters.patch Type: application/octet-stream Size: 727 bytes Desc: not available Url : http://codespeak.net/pipermail/kupu-dev/attachments/20080918/625686c6/attachment.obj From michiel.meeuwissen at gmail.com Fri Sep 19 14:19:55 2008 From: michiel.meeuwissen at gmail.com (Michiel Meeuwissen) Date: Fri, 19 Sep 2008 14:19:55 +0200 Subject: [kupu-dev] designMode vs contentEditable Message-ID: <5933cdb30809190519p3f3eaac9he2440e276837d0a@mail.gmail.com> I notice that kup is still using 'designMode' for Firefox. In Firefox 3 also 'contentEditable' (like in IE) is working. More so, as far as I can see, it is working _better_, because for example also inline flash object tags are still shown in edit-mode. I think kupu does support flash-objects, at least I encounter some code about that in e.g. drawer.xsl. How well is this working? And how well does it work in FF3, because I think currently flash objects cannot be shown inside the edit frame itself. I'm trying to make all this flash-stuff working, but for that I think it would be nice if the flash-objects can be shown inline, and therefor I think I prefer to use contentEditable, at least for FF >=3. Would there be any reason why this is not good? greetings, Michiel -- mihxil' http://meeuw.org nl_NL eo_XX en_US