From wouter at netcentric.be Thu Nov 8 14:14:04 2007 From: wouter at netcentric.be (Wouter Vanden Hove) Date: Thu, 08 Nov 2007 14:14:04 +0100 Subject: [kupu-dev] Avoid filtering of HTML-comments Message-ID: Hi, I fail to find meaningful pointers on how to disable the filtering of html-comments in kupu. I'm migrating legacy content that contains many meaningful text in html-comments that should be preserved. You can disable *all* filtering, but is there a way to just disable the html-comment filtering? -- Wouter Vanden Hove Netcentric.be From g.bernhard at akbild.ac.at Thu Nov 8 15:52:12 2007 From: g.bernhard at akbild.ac.at (Georg Gogo. BERNHARD) Date: Thu, 08 Nov 2007 15:52:12 +0100 Subject: [kupu-dev] Avoid filtering of HTML-comments In-Reply-To: References: Message-ID: <4733229C.1030801@akbild.ac.at> Hi! Maybe consider evaluating GoReplace; It was no joke @ naples that it really works... https://svn.plone.org/svn/collective/GoReplace/tags/GoReplace-1.3-meatgrinder/ It can help you to find and replace content and maybe you can avoid the filtering problem completely if you just can change the html comments code to something more "safe". Gogo. Wouter Vanden Hove wrote: > Hi, > > I fail to find meaningful pointers on how to disable the filtering of > html-comments in kupu. I'm migrating legacy content that contains many > meaningful text in html-comments that should be preserved. > > You can disable *all* filtering, but is there a way to just disable the > html-comment filtering? > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: g.bernhard.vcf Type: text/x-vcard Size: 115 bytes Desc: not available Url : http://codespeak.net/pipermail/kupu-dev/attachments/20071108/1bb728ca/attachment.vcf From duncan.booth at suttoncourtenay.org.uk Thu Nov 8 15:52:14 2007 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Thu, 8 Nov 2007 14:52:14 +0000 (UTC) Subject: [kupu-dev] Avoid filtering of HTML-comments References: Message-ID: Wouter Vanden Hove wrote: > Hi, > > I fail to find meaningful pointers on how to disable the filtering of > html-comments in kupu. I'm migrating legacy content that contains many > meaningful text in html-comments that should be preserved. > > You can disable *all* filtering, but is there a way to just disable the > html-comment filtering? > Only by editing the filtering code. See kupucontentfilters.js, right at the bottom where there is code for copying nodeTypes 1, 3, and 4. Comments are nodeType 8, so you could try adding something to copy those nodes. Untested code, insert: else if (kid.nodeType == 8) { parentnode.appendChild(ownerdoc.createComment(kid.nodeValue)); } Be aware that recent versions of kupu in Plone will refuse to edit any field which starts with an HTML comment: this allows you to suppress kupu permanently for individual field instances. From sean.upton at uniontrib.com Thu Nov 8 20:16:47 2007 From: sean.upton at uniontrib.com (sean.upton at uniontrib.com) Date: Thu, 8 Nov 2007 11:16:47 -0800 Subject: [kupu-dev] Avoid filtering of HTML-comments In-Reply-To: Message-ID: <2DBD6171D5E06F4E9B783D6E8E0DD8A802207C08@DESI.hollywood.sduniontrib.com> Duncan Booth said: > > > You can disable *all* filtering, but is there a way to just disable > > the html-comment filtering? > > > Only by editing the filtering code. See > kupucontentfilters.js, right at the bottom where there is > code for copying nodeTypes 1, 3, and 4. Comments are nodeType > 8, so you could try adding something to copy those nodes. > Untested code, insert: > > else if (kid.nodeType == 8) { > parentnode.appendChild(ownerdoc.createComment(kid.nodeValue)); > } > > Be aware that recent versions of kupu in Plone will refuse to > edit any field which starts with an HTML comment: this allows > you to suppress kupu permanently for individual field instances. Having both behaviors regarding HTML comments be configurable within the Plone Kupu setup seems like it would be a good idea. Problem this has caused for media publishing applications I have supported: authors comment out a piece of content with the intent of possibly re-enabling it, and are surprised (to put it mildly) that it vanishes. Also, content imported from external systems generating HTML often have HTML comments at the start of content. These behaviors violate principle of least-surprise for many users; configurability in a control panel for Plone integrators (along with associated documentation/warning, GS extension profile example) would be an ideal (I might be able to contribute time to coding this). Thoughts? Sean From oyesiji at hotmail.com Sun Nov 11 02:45:42 2007 From: oyesiji at hotmail.com (Jubri Siji) Date: Sun, 11 Nov 2007 01:45:42 +0000 Subject: [kupu-dev] Problem running KUPU Message-ID: An error window always appears with this text: There was a problem initiaiting the drawers. Most likely the XSLT or XML files are not available. If this is not the Kupu demo version, check your files or the service that provide them Please how can i resolve this _________________________________________________________________ Peek-a-boo FREE Tricks & Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20071111/6ab9a0f9/attachment.htm From duncan.booth at suttoncourtenay.org.uk Mon Nov 12 09:20:29 2007 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Mon, 12 Nov 2007 08:20:29 +0000 (UTC) Subject: [kupu-dev] Avoid filtering of HTML-comments References: <2DBD6171D5E06F4E9B783D6E8E0DD8A802207C08@DESI.hollywood.sduniontrib.com> Message-ID: wrote: > Having both behaviors regarding HTML comments be configurable within the > Plone Kupu setup seems like it would be a good idea. > > Problem this has caused for media publishing applications I have > supported: authors comment out a piece of content with the intent of > possibly re-enabling it, and are surprised (to put it mildly) that it > vanishes. Also, content imported from external systems generating HTML > often have HTML comments at the start of content. > > These behaviors violate principle of least-surprise for many users; > configurability in a control panel for Plone integrators (along with > associated documentation/warning, GS extension profile example) would be > an ideal (I might be able to contribute time to coding this). > > Thoughts? My first reaction is that this sounds totally wrong: kupu is providing wysiwyg editing, and expecting comments in the HTML source to remain unsullied is completely outside the scope of a wysiwyg editor. If you want to make a change with a view to rolling it back later then use CMFEditions to create a version. Don't rely on hacking the html. If you have content imported from an external system then you can surely arrange to strip any leading comments. The comments aren't going to help anyone doing wysiwyg editing, so if they are important you want wysiwyg turned off anyway. And if you want to modify the behaviour in your system, then you can customise the relevant javascript files. From duncan.booth at suttoncourtenay.org.uk Mon Nov 12 10:18:34 2007 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Mon, 12 Nov 2007 09:18:34 +0000 (UTC) Subject: [kupu-dev] Problem running KUPU References: Message-ID: Jubri Siji wrote: > An error window always appears with this text: There was a problem > initiaiting the drawers. Most likely the XSLT or XML files are not > available. If this is not the Kupu demo version, check your files or > the service that provide them > > > > Please how can i resolve this Look at your server logs to see what files were being requested and what was returned. From jon at onenw.org Mon Nov 12 16:42:40 2007 From: jon at onenw.org (Jon Stahl) Date: Mon, 12 Nov 2007 07:42:40 -0800 Subject: [kupu-dev] Avoid filtering of HTML-comments In-Reply-To: References: <2DBD6171D5E06F4E9B783D6E8E0DD8A802207C08@DESI.hollywood.sduniontrib.com> Message-ID: <47387470.6090900@onenw.org> Duncan Booth wrote: > wrote: > > >> Having both behaviors regarding HTML comments be configurable within >> > the > >> Plone Kupu setup seems like it would be a good idea. >> >> Problem this has caused for media publishing applications I have >> supported: authors comment out a piece of content with the intent of >> possibly re-enabling it, and are surprised (to put it mildly) that it >> vanishes. Also, content imported from external systems generating >> > HTML > >> often have HTML comments at the start of content. >> >> These behaviors violate principle of least-surprise for many users; >> configurability in a control panel for Plone integrators (along with >> associated documentation/warning, GS extension profile example) would >> > be > >> an ideal (I might be able to contribute time to coding this). >> >> Thoughts? >> > > My first reaction is that this sounds totally wrong: kupu is providing > wysiwyg editing, and expecting comments in the HTML source to remain > unsullied is completely outside the scope of a wysiwyg editor. > > If you want to make a change with a view to rolling it back later then > use CMFEditions to create a version. Don't rely on hacking the html. > > If you have content imported from an external system then you can surely > arrange to strip any leading comments. The comments aren't going to help > anyone doing wysiwyg editing, so if they are important you want wysiwyg > turned off anyway. > > And if you want to modify the behaviour in your system, then you can > customise the relevant javascript files. > Duncan- I think Sean's expectation is actually pretty reasonable. WYSIWYG editors like Dreamweaver and FrontPage leave comments unmolested when you're editing graphically. If it's not difficult to support, I'd be +1. Even though I agree that using comments for revision-management is asking for trouble. best, jon From duncan.booth at suttoncourtenay.org.uk Mon Nov 12 17:09:45 2007 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Mon, 12 Nov 2007 16:09:45 +0000 (UTC) Subject: [kupu-dev] Avoid filtering of HTML-comments References: <47387470.6090900@onenw.org> Message-ID: Jon Stahl wrote: > I think Sean's expectation is actually pretty reasonable. WYSIWYG > editors like Dreamweaver and FrontPage leave comments unmolested when > you're editing graphically. > > If it's not difficult to support, I'd be +1. Even though I agree that > using comments for revision-management is asking for trouble. The patch I posted earlier in this thread is all that is needed, but the behaviour isn't quite perfect. The worst problem is that a comment at the start turns off kupu. If I'd realised anyone would want to have comments at the same time as wysiwyg editing I could have insisted on a specific format of comment, but I can't break behaviour on a minor release. I guess I could add another config option to specify a substring which has to occur in the leading comment to suppress kupu (defaulting to blank): that would preserve behaviour and still allow anyone who really wants comments to keep them. There also seems to be a problem that comments are being moved out of paragraphs, and in IE sometimes disappear altogether. I'll have to investigate whether that is something I'm doing or a feature provided by the browsers. From duncan.booth at suttoncourtenay.org.uk Mon Nov 12 17:32:19 2007 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Mon, 12 Nov 2007 16:32:19 +0000 (UTC) Subject: [kupu-dev] Avoid filtering of HTML-comments References: <47387470.6090900@onenw.org> Message-ID: Duncan Booth wrote: > There also seems to be a problem that comments are being moved out of > paragraphs, and in IE sometimes disappear altogether. I'll have to > investigate whether that is something I'm doing or a feature provided > by the browsers. > It is something I'm doing. I'll fix it. From duncan.booth at suttoncourtenay.org.uk Tue Nov 13 10:31:48 2007 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Tue, 13 Nov 2007 09:31:48 +0000 (UTC) Subject: [kupu-dev] Avoid filtering of HTML-comments References: <47387470.6090900@onenw.org> Message-ID: Duncan Booth wrote: > Duncan Booth wrote: > >> There also seems to be a problem that comments are being moved out of >> paragraphs, and in IE sometimes disappear altogether. I'll have to >> investigate whether that is something I'm doing or a feature provided >> by the browsers. >> > It is something I'm doing. I'll fix it. > Checked in to SVN: Kupu no longer removes HTML comments (nor does it split paragraphs at comments any more!). However, if the html starts with a comment IE still seems to strip that out and I don't think it is anything I'm doing. Leading comments are preserved if you edit with Firefox. Also leading comments still suppress kupu: I haven't changed that behaviour. From s.jurisch at siegnetz.de Mon Nov 26 17:55:33 2007 From: s.jurisch at siegnetz.de (Stefan Jurisch) Date: Mon, 26 Nov 2007 17:55:33 +0100 Subject: [kupu-dev] plone / create external link / title attribute Message-ID: <20071126165533.GA8536@kungfu.siegnetz.de> hello together, I'm a german plone user and I use plone 3 which is distributed with the kupu editor as inline-wysiwyg-editor. I already asked this question to german forums and mailing lists, but I did not get a usable answer yet. For a customer I have to implement an additional textfield where this customer is able to input the content for an optional title attrbute while creating an external link. can anyone tell me, how to do that (I can implement it myself, I think, but yet I do not even know, where to locate the files, in which of them I had to add some code!). Thanks in advance. Greetz, Stefan Jurisch, Germany -- Stefan Jurisch ---------------------- SIEGNETZ.IT GmbH Schneppenkauten 1a D-57076 Siegen Tel. +49 271 68193-14 Fax: +49 271 68193-29 http://www.siegnetz.de Amtsgericht Siegen HRB4838 Gesch?ftsf?hrer: Oliver Seitz Sitz der Gesellschaft ist Siegen -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From duncan.booth at suttoncourtenay.org.uk Mon Nov 26 22:59:44 2007 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Mon, 26 Nov 2007 21:59:44 +0000 (UTC) Subject: [kupu-dev] plone / create external link / title attribute References: <20071126165533.GA8536@kungfu.siegnetz.de> Message-ID: Stefan Jurisch wrote: > For a customer I have to implement an additional textfield where this > customer is able to input the content for an optional title attrbute > while creating an external link. can anyone tell me, how to do that (I > can implement it myself, I think, but yet I do not even know, where to > locate the files, in which of them I had to add some code!). > Edit 'default/drawers.kupu' the div with id="kupu-drawer" is the HTML for the external link drawer. The input field kupu-linkdrawer-input is the url. After editing any .kupu file you must run 'make plonemacros' from the kupu folder to rebuild the plone wysiwyg macro. Look in common/kupudrawers.js (search for kupu-linkdrawer-input to find where it is used). The link itself is created by the call: this.tool.createLink(url, null, null, this.target, null, 'external-link'); The parameters for createLink are: (url, type, name, target, title, className) N.B. In some versions of kupu (all but the latest svn checkout!) the string 'external-link' was passed in the title parameter by mistake. So all you have to do is add your own field and pass its value as the 5th parameter to createLink. Also you probably want to initialise the value of your title field from linkel.title in the createContent method. From s.jurisch at siegnetz.de Tue Nov 27 17:36:49 2007 From: s.jurisch at siegnetz.de (Stefan Jurisch) Date: Tue, 27 Nov 2007 17:36:49 +0100 Subject: [kupu-dev] plone / create external link / title attribute In-Reply-To: References: <20071126165533.GA8536@kungfu.siegnetz.de> Message-ID: <20071127163649.GA28773@kungfu.siegnetz.de> thanks for these tips. I was able to implement and activate this function. now i had the idea to apply these changes to the current kupu development branch, but I do not right know, how and where to do that. if there is an interest in my patch: where/how do I put it? Shall I provide it here via this mailinglist as a patch-file or shall I just commit it to the current svn-trunk? greetz stefan jurisch On Mon, Nov 26, 2007 at 09:59:44PM +0000, Duncan Booth wrote: > Stefan Jurisch wrote: > > > For a customer I have to implement an additional textfield where this > > customer is able to input the content for an optional title attrbute > > while creating an external link. can anyone tell me, how to do that (I > > can implement it myself, I think, but yet I do not even know, where to > > locate the files, in which of them I had to add some code!). > > > > Edit 'default/drawers.kupu' the div with id="kupu-drawer" is the HTML for > the external link drawer. The input field kupu-linkdrawer-input is the url. > After editing any .kupu file you must run 'make plonemacros' from the kupu > folder to rebuild the plone wysiwyg macro. > > Look in common/kupudrawers.js (search for kupu-linkdrawer-input to find > where it is used). The link itself is created by the call: > > this.tool.createLink(url, null, null, this.target, null, 'external-link'); > > The parameters for createLink are: (url, type, name, target, title, > className) > N.B. In some versions of kupu (all but the latest svn checkout!) the string > 'external-link' was passed in the title parameter by mistake. > > So all you have to do is add your own field and pass its value as the 5th > parameter to createLink. Also you probably want to initialise the value of > your title field from linkel.title in the createContent method. > > _______________________________________________ > kupu-dev mailing list > kupu-dev at codespeak.net > http://codespeak.net/mailman/listinfo/kupu-dev > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > -- Stefan Jurisch ---------------------- SIEGNETZ.IT GmbH Schneppenkauten 1a D-57076 Siegen Tel. +49 271 68193-14 Fax: +49 271 68193-29 http://www.siegnetz.de Amtsgericht Siegen HRB4838 Gesch?ftsf?hrer: Oliver Seitz Sitz der Gesellschaft ist Siegen -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.