From morten at nidelven-it.no Thu Jan 1 21:50:04 2009 From: morten at nidelven-it.no (Morten W. Petersen) Date: Thu, 01 Jan 2009 21:50:04 +0100 Subject: [kupu-dev] HXTML validation of editing pages, kupu Message-ID: <495D2C7C.4070906@nidelven-it.no> Hi boys and girls, I'm validating a Plone site and discovered that whenever kupu is involved, things aren't going as expected.. The page identifies itself as valid XHTML: However, when running it through the W3C validator http://validator.w3.org/ it barfs on the kupu configuration section: #
# # # # fulldoc.html # 0 # 0 # ... Any ideas on how that can be fixed? Regards, Morten From michiel.meeuwissen at gmail.com Fri Jan 2 12:13:02 2009 From: michiel.meeuwissen at gmail.com (Michiel Meeuwissen) Date: Fri, 2 Jan 2009 12:13:02 +0100 Subject: [kupu-dev] HXTML validation of editing pages, kupu In-Reply-To: <495D2C7C.4070906@nidelven-it.no> References: <495D2C7C.4070906@nidelven-it.no> Message-ID: <5933cdb30901020313k1a073f7fo2168895202f06fca@mail.gmail.com> 2009/1/1 Morten W. Petersen : > it barfs on the kupu configuration section: > > #
> # > # > # > # fulldoc.html > # 0 > # 0 > # ... > > Any ideas on how that can be fixed? Using namespaces, perhaps? I never tried it, but it seems the most logical way to mix xml's of several document types (in this case xhtml and 'kupuconfig'). I Michiel -- mihxil' http://meeuw.org nl_NL eo_XX en_US From johnny at johnnydebris.net Sat Jan 3 09:23:38 2009 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Sat, 03 Jan 2009 09:23:38 +0100 Subject: [kupu-dev] HXTML validation of editing pages, kupu In-Reply-To: <5933cdb30901020313k1a073f7fo2168895202f06fca@mail.gmail.com> References: <495D2C7C.4070906@nidelven-it.no> <5933cdb30901020313k1a073f7fo2168895202f06fca@mail.gmail.com> Message-ID: <495F208A.2000703@johnnydebris.net> Michiel Meeuwissen wrote: > 2009/1/1 Morten W. Petersen : > >> it barfs on the kupu configuration section: >> >> #
>> # >> # >> # >> # fulldoc.html >> # 0 >> # 0 >> # ... >> >> Any ideas on how that can be fixed? >> > > Using namespaces, perhaps? I never tried it, but it seems the most > logical way to mix xml's of several document types (in this case xhtml > and 'kupuconfig'). I > > If I remember correctly, older IE versions didn't like the namespaces much, but a) I may be wrong, and b) it may well be that those versions aren't supported anymore anyway... I know the 'XML island' is not proper in many ways, but back then it seemed to be the best solution - currently I wouldn't mind replacing it with something more sane... Cheers, Guido > Michiel > > From michiel.meeuwissen at gmail.com Sat Jan 3 10:36:49 2009 From: michiel.meeuwissen at gmail.com (Michiel Meeuwissen) Date: Sat, 3 Jan 2009 10:36:49 +0100 Subject: [kupu-dev] HXTML validation of editing pages, kupu In-Reply-To: <495F208A.2000703@johnnydebris.net> References: <495D2C7C.4070906@nidelven-it.no> <5933cdb30901020313k1a073f7fo2168895202f06fca@mail.gmail.com> <495F208A.2000703@johnnydebris.net> Message-ID: <5933cdb30901030136g7fc2cb02jb65a27a9a7e4018e@mail.gmail.com> 2009/1/3 Guido Wesdorp : > ways, but back then it seemed to be the best solution - currently I wouldn't > mind replacing it with something more sane... Another solution would probably be to make it a seperate (application/xml) request. Michiel -- mihxil' http://meeuw.org nl_NL eo_XX en_US From duncan.booth at suttoncourtenay.org.uk Sat Jan 3 15:31:16 2009 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Sat, 3 Jan 2009 14:31:16 +0000 (UTC) Subject: [kupu-dev] HXTML validation of editing pages, kupu References: <495D2C7C.4070906@nidelven-it.no> <5933cdb30901020313k1a073f7fo2168895202f06fca@mail.gmail.com> <495F208A.2000703@johnnydebris.net> Message-ID: Guido Wesdorp wrote: > Michiel Meeuwissen wrote: >> 2009/1/1 Morten W. Petersen : >> >>> it barfs on the kupu configuration section: >>> >>> #
>>> # >>> # >>> # >>> # fulldoc.html >>> # 0 >>> # 0 >>> # ... >>> >>> Any ideas on how that can be fixed? >>> >> >> Using namespaces, perhaps? I never tried it, but it seems the most >> logical way to mix xml's of several document types (in this case xhtml >> and 'kupuconfig'). I >> >> > If I remember correctly, older IE versions didn't like the namespaces > much, but a) I may be wrong, and b) it may well be that those versions > aren't supported anymore anyway... I know the 'XML island' is not proper > in many ways, but back then it seemed to be the best solution - > currently I wouldn't mind replacing it with something more sane... > For 'more sane' I would just render the configuration block into javascript data. We already need a javascript tag to initialise kupu so that could accept the config data as a parameter. From johnny at johnnydebris.net Mon Jan 5 13:20:17 2009 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Mon, 05 Jan 2009 13:20:17 +0100 Subject: [kupu-dev] HXTML validation of editing pages, kupu In-Reply-To: References: <495D2C7C.4070906@nidelven-it.no> <5933cdb30901020313k1a073f7fo2168895202f06fca@mail.gmail.com> <495F208A.2000703@johnnydebris.net> Message-ID: <4961FB01.9030202@johnnydebris.net> Duncan Booth wrote: > For 'more sane' I would just render the configuration block into javascript > data. We already need a javascript tag to initialise kupu so that could > accept the config data as a parameter. > > An obvious disadvantage to that solution would be that filling chunks of JS from TAL is less nice than filling in XML values... But I do agree that on the client using a JS struct this way would be a lot nicer. Cheers, Guido From eric at infrae.com Mon Jan 5 13:43:22 2009 From: eric at infrae.com (eric casteleijn) Date: Mon, 05 Jan 2009 13:43:22 +0100 Subject: [kupu-dev] Proposed patch: click *and* mouseup event triggering? Message-ID: <4962006A.6040307@infrae.com> [Reported by Andy Altepeter, who's not on this list.] In kupu/common/kupueditor.js we have: if (event.type == 'click' || event.type=='mouseup' || (event.type == 'keyup' && interesting_codes.contains(event.keyCode))) which (in some cases/browsers?) means that the event handler is triggered twice, once for the mouseup, and once for the entire click event. Changing this to just: if (event.type == 'click' || Seems to fix this, and have no adverse effects. Is there a reason both are checked, or should I commit this patch? -- - eric casteleijn http://infrae.com From gogo at bluedynamics.com Mon Jan 12 08:14:09 2009 From: gogo at bluedynamics.com (gogo at bluedynamics.com) Date: Mon, 12 Jan 2009 08:14:09 +0100 Subject: [kupu-dev] Inserting 'small' tag does not work (FF3) Message-ID: Dear kupu-dev list! I have a problem using "small" in kupu_config as "Style". My definition section for "Styles" looks looks like this: """ Small|small Heading|h2 Subheading|h3 Literal|pre Discreet|p|discreet Pull-quote|div|pullquote Call-out|p|callout Highlight|span|visualHighlight Odd row|tr|odd Even row|tr|even Heading cell|th| """ I just added the first line to the defaults: 'Small|small', using kupu1.4.12. When i try to use the style it shows up in the dropdown menu, the other styles seem to work as they should, but *small* does not. What am I doing wrong here??? This misbehaviour just happens in Firefox3, i tested Firefox2 and there was no problem, it just works there. Firebug does not show anything, all quiet. I forced all of our 500 employees not to use internet explorer for editing any more, so i have not tested that :-P Any help would be very appreciated! Regards Georg Gogo. BERNHARD From duncan.booth at suttoncourtenay.org.uk Mon Jan 12 14:37:22 2009 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Mon, 12 Jan 2009 13:37:22 +0000 (UTC) Subject: [kupu-dev] Inserting 'small' tag does not work (FF3) References: Message-ID: "gogo at bluedynamics.com" wrote: > I have a problem using "small" in kupu_config as "Style". > My definition section for "Styles" looks looks like this: > > """ > Small|small > Heading|h2 > Subheading|h3 > Literal|pre > Discreet|p|discreet > Pull-quote|div|pullquote > Call-out|p|callout > Highlight|span|visualHighlight > Odd row|tr|odd > Even row|tr|even > Heading cell|th| > """ > > I just added the first line to the defaults: 'Small|small', using > kupu1.4.12. When i try to use the style it shows up in the dropdown menu, > the other styles seem to work as they should, but *small* does not. > > What am I doing wrong here??? See the documentation. Specifically: Kupu allows you to specify styles for paragraphs (P or DIV tags), character styles (SPAN tags), and table elements (TABLE, THEAD, TBODY, TFOOT, TR, TH, TD tags). The table styles are only available while the cursor is inside a table, other styles are available at all times. Other tags not mentioned in the documentation may work on some browsers but not on others. I'm afraid all I can suggest short term is that you define a class and use instead of the tag. Even SPAN tags use something of a kludge: the browsers don't support a clean way to apply SPAN tags so kupu applies FONT tags and then fixes them up afterwards. It is probably a fairly small change to the code to use the same kludge for some other desirable tags such as small or cite. See kupubasetools.js line 746 onwards if anyone fancies contributing a patch. From l at lrowe.co.uk Thu Jan 15 02:39:44 2009 From: l at lrowe.co.uk (Laurence Rowe) Date: Thu, 15 Jan 2009 02:39:44 +0100 Subject: [kupu-dev] Kupu XHTML and libxml2 Message-ID: 2009/1/1 Morten W. Petersen : > it barfs on the kupu configuration section: > > #
> # > # > # > # fulldoc.html > # 0 > # 0 > # ... > > Any ideas on how that can be fixed? I've just run into the same problem with the push parser interface of libxml2's HTMLParser (it seems the htmlCtxtRead* functions are more forgiving). As this is running in a proxy (to apply the new plone.org theme), I'm reluctant to read the whole file to memory before parsing. Can anyone think of a quick and dirty workaround? Maybe wrapping the output into a javascript document.write? Laurence From duncan.booth at suttoncourtenay.org.uk Thu Jan 15 15:56:46 2009 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Thu, 15 Jan 2009 14:56:46 +0000 (UTC) Subject: [kupu-dev] Kupu XHTML and libxml2 References: Message-ID: "Laurence Rowe" wrote: > 2009/1/1 Morten W. Petersen : >> it barfs on the kupu configuration section: >> >> #
>> # >> # >> # >> # fulldoc.html >> # 0 >> # 0 >> # ... >> >> Any ideas on how that can be fixed? > > I've just run into the same problem with the push parser interface of > libxml2's HTMLParser (it seems the htmlCtxtRead* functions are more > forgiving). As this is running in a proxy (to apply the new plone.org > theme), I'm reluctant to read the whole file to memory before parsing. > > Can anyone think of a quick and dirty workaround? Maybe wrapping the > output into a javascript document.write? > Quick and dirty: Edit kupu_plone_layer/kupu_wysiwyg_support.html Find the
which encloses the xml section. Extract the xml content of the div, and write a Python script which generates the example same XML. Modify the script so that it removes newlines, escapes quotes, and wraps the whole thing in a document.write. Edit the div tag so it reads:
(I'm not sure exactly what parameters you'll need to pass the script) For bonus points move it from being a script to being a method on the kupu tool. Optionally: update the .kupu files to generate the correct tal in the div tag otherwise you'll have to reapply the hack every time kupu is updated. From l at lrowe.co.uk Fri Jan 16 02:55:25 2009 From: l at lrowe.co.uk (Laurence Rowe) Date: Fri, 16 Jan 2009 02:55:25 +0100 Subject: [kupu-dev] Kupu XHTML and libxml2 In-Reply-To: References: Message-ID: That worked. I've made these changes (skin templates / scripts only) on trunk in r61025. I don't understand the .kupu files sufficiently to change those. Laurence 2009/1/15 Duncan Booth : > "Laurence Rowe" wrote: > >> 2009/1/1 Morten W. Petersen : >>> it barfs on the kupu configuration section: >>> >>> #
>>> # >>> # >>> # >>> # fulldoc.html >>> # 0 >>> # 0 >>> # ... >>> >>> Any ideas on how that can be fixed? >> >> I've just run into the same problem with the push parser interface of >> libxml2's HTMLParser (it seems the htmlCtxtRead* functions are more >> forgiving). As this is running in a proxy (to apply the new plone.org >> theme), I'm reluctant to read the whole file to memory before parsing. >> >> Can anyone think of a quick and dirty workaround? Maybe wrapping the >> output into a javascript document.write? >> > Quick and dirty: > > Edit kupu_plone_layer/kupu_wysiwyg_support.html > Find the
which encloses the xml section. > > Extract the xml content of the div, and write a Python script which > generates the example same XML. > > Modify the script so that it removes newlines, escapes quotes, and wraps > the whole thing in a document.write. > > Edit the div tag so it reads:
> > (I'm not sure exactly what parameters you'll need to pass the script) > > For bonus points move it from being a script to being a method on the > kupu tool. > > Optionally: update the .kupu files to generate the correct tal in the > div tag otherwise you'll have to reapply the hack every time kupu is > updated. > > > _______________________________________________ > kupu-dev mailing list > kupu-dev at codespeak.net > http://codespeak.net/mailman/listinfo/kupu-dev > From davidglick at onenw.org Fri Jan 16 20:36:35 2009 From: davidglick at onenw.org (David Glick) Date: Fri, 16 Jan 2009 11:36:35 -0800 Subject: [kupu-dev] kupu 1.4.12 tarball Message-ID: Is there an old-style product tarball of kupu 1.4.12 available? I can't use the egg with Plone < 3.2, because it declares dependencies on a bunch of things that were still distributed as tarballs before Plone 3.2 (I can use fake eggs for the time being, but it's messy.) thanks, David Glick Web Developer ONE/Northwest New tools and strategies for engaging people in protecting the environment http://www.onenw.org davidglick at onenw.org work: (206) 286-1235 x32 mobile: (206) 679-3833 Subscribe to ONEList, our email newsletter! Practical advice for effective online engagement http://www.onenw.org/full_signup -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20090116/1e0e2e47/attachment.htm From duncan.booth at suttoncourtenay.org.uk Sat Jan 17 13:21:27 2009 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Sat, 17 Jan 2009 12:21:27 +0000 (UTC) Subject: [kupu-dev] kupu 1.4.12 tarball References: Message-ID: David Glick wrote: > Is there an old-style product tarball of kupu 1.4.12 available? I > can't use the egg with Plone < 3.2, because it declares dependencies > on a bunch of things that were still distributed as tarballs before > Plone 3.2 (I can use fake eggs for the time being, but it's messy.) > Oops. http://plone.org/products/kupu/releases/1.4.12 For some reason it was marked as unreleased, so I just released it. From sune at headnet.dk Fri Jan 23 15:58:51 2009 From: sune at headnet.dk (Sune Toft - Headnet) Date: Fri, 23 Jan 2009 15:58:51 +0100 Subject: [kupu-dev] Graceful degradation for users without javascript In-Reply-To: References: Message-ID: <4979DB2B.1070304@headnet.dk> Hi :) We got some users on a Plone community sites, who has javascript turned off. They are not able to what is entered in a text field (rich widget). As we recall it, it has been a feature in earlier Plone + Kupu setups that users without JS gracefull were degradated to a textfield showing the htmlcode - now nothing is shown. When the user choose not to use kupu in her personal settings it works - but should there be a graceful degradation ? Its the same in FF anf IE We are using Plone 3.1.5.1 and kupu 1.4.11 -- ======================== Sune Toft Partner, Projektleder Headnet ApS Fruebjergvej 3 Symbion Science Park - Box 50 2100 K?benhavn ?. Telefon: +45 3917 9750 Fax: +45 3917 9751 Mobil: +45 2943 9585 http://www.headnet.dk sune at headnet.dk ======================= Headnet - devoted to Plone http://www.plone.org Vinder af "Bedst til Nettet" 2005 - 2006 http://bedstpaanettet.dk From duncan.booth at suttoncourtenay.org.uk Fri Jan 23 20:18:32 2009 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Fri, 23 Jan 2009 19:18:32 +0000 (UTC) Subject: [kupu-dev] Graceful degradation for users without javascript References: <4979DB2B.1070304@headnet.dk> Message-ID: Sune Toft - Headnet wrote: > Hi :) > > We got some users on a Plone community sites, who has javascript turned > off. They are not able to what is entered in a text field (rich widget). > As we recall it, it has been a feature in earlier Plone + Kupu setups > that users without JS gracefull were degradated to a textfield showing > the htmlcode - now nothing is shown. > > When the user choose not to use kupu in her personal settings it works - > but should there be a graceful degradation ? > Yes it should. At one point I did try to make it degrade gracefully, but it interacted badly with KSS (i.e. the inline editing feature broke) so I had to roll back that change. I never did manage to come up with a way to handle non-javascript users that would also work for users who had javascript and inline editing enabled From johnny at debris.demon.nl Tue Jan 27 20:21:57 2009 From: johnny at debris.demon.nl (Johnny deBris) Date: Tue, 27 Jan 2009 20:21:57 +0100 Subject: [kupu-dev] Proposed patch: click *and* mouseup event triggering? In-Reply-To: <4962006A.6040307@infrae.com> References: <4962006A.6040307@infrae.com> Message-ID: <497F5ED5.3020302@debris.demon.nl> eric casteleijn wrote: > if (event.type == 'click' || > > Seems to fix this, and have no adverse effects. Is there a reason both > are checked, or should I commit this patch? > > Sorry, forgot about this one a bit I fear... Obviously, if all supported browsers (or at least IE 6+ and some recent FF 2 and 3 versions) seem to behave properly, I'd welcome your patch! Cheers, Guido