create new tag
, view all tags

KupuEditorAddOnDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on KupuEditorAddOn contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on the KupuEditorAddOn

-- DamienMandrioli & RomainRaugi


  • This is looking really good.
  • Looks promising.
  • Buggy, but a step in the right direction.
  • A good and stable WYSIWYG editor is a great enhancement for TWiki! Go for it smile

Significant Issues

Attachment Script Violates Perl Security

The kupu_attachments script uses "tainted" data to name the temporary file used to store the upload. This causes perl to die with a security message along the lines of "Insecure Dependency" on line 56. Information on this feature of perl can be found here.

I've corrected the problem by removing the parameter variables from the temporary file name and replacing them with a random digit string from rand(). This has fixed the problem on my box and I've attached my version of the script to this topic.

-- DanBoitnott - 18 Mar 2005

Installation instructions in KupuEditorAddOn need to be more clear

Some simple 1. 2. 3. step instructions would help. For example I don't know if the htaccess managment section is required or optional. And if it's required I don't understand what it means. The modify viewing twiki template I don't get either. I don't have a viewing.tmpl in /twiki/templates, I'm assuming it means view.templ. I went ahead and tried to add the Kupu Edit link to a test page, but when I click it, I always get the topic is locked by myself. If I click edit anyways It goes to the regular edit page. Thanks!

-- DanEdwards - 13 Oct 2004

Installation instructions concerning htaccess management have been updated.

We are not able to reproduce your problem, maybe an Apache configuration issue.

-- DamienMandrioli - 19 Oct 2004

easy WikiWord linking is broken

This was obviously a design design, but easy WikiWord linking is broken (neither CamelCase or [[]] bracket syntax work). Instead of just typing one out, users must now use the menu on the right hand side to create a link to another topic. I think this is a mistake. It is nice to have a list of already existing pages -- if you don't have too many -- but the cost is too high. I would prefer to flip this on it's head: use the side menu when you don't want to link (or can't remember how to spell the page you're looking for).

The decision to deny the user the ability to create links by typing in the edit area will keep me from using it however. It is the single most important feature of wiki, as much as any single item can be extracted from the rest, in my opinion. -- MattWilkie - 15 Sep 2004

Fixed in version 1.0b4

-- RomainRaugi - 10 Oct 2004

InterWiki links are replaced with [[]] bracket syntax

This is not desirable (probably a result of choosing to not use wiki linking).

Fixed in version 1.0b4

-- RomainRaugi - 10 Oct 2004

Text removed from [[ref][text]]

Occurrences of [[reference][text]] (where reference is an internal WikiWord) are converted to just the reference, meaning the text is lost. This does not happen when the reference is an external link e.g. http://...

-- ChrisDevine - 24 Feb 2005

Cut and paste is non-deterministic

Oooh, that's nasty. I just cut four lines but when I pasted I got only two back.

Editor Quibbles / Small Annoyances

A quick brain dump of observations while using the kupu for twiki editor. Some of them are minor points which will obviously be solved at some future date, others have more significant consequences.

  • Undo doesn't work after edit source is used. (also seems to happen in other circumstances).
  • bold/italic works for single words and short phrases but is lost on save if it spans more than one line. I can't always reproduce this bug.
    • maybe related to first two: sometimes the html is left intact instead of being converted to TML, e.g. <span style="font-style: italic;">edit source</span> instead of _edit source_ in the first bullet.
  • "busy saving" is a little too subdued. It would be nice if the cursor was changed to an hour glass.
  • BR are occasionally insterted in the middle of lists (and everywhere else too) by some logic I haven't been able to track down yet.
  • the panel on the right hand side is a little large.
  • Alt instead of ctrl and shortcuts work fine. A heck of a workout for retraining the muscle memory though.
  • Hmmm, only topics from the Know web are listed in "choose topic from the list" (I'm in the Sandbox web).

-- MattWilkie

Must have a perl translation of the HTML->TML translator.

Java translator has been translated to JavaScript in version 1.0b4

-- RomainRaugi - 10 Oct 2004

Needs preparing for distribution

May I suggest you prepare the archive for distribution? I.e. work out where you want the files to go in /lib /bin, etc?

-- MartinCleaver - 05 Sep 2004

It must be only an JS file on /pub with some others "plugins" in JS too.

-- AurelioAHeckert - 06 Sep 2004

There's already an installation script, furthermore server-side scripts take care of directories that can be configured by user. Final distribution will be done by ColasNahaboo (when a non-java translator will be available).

-- DamienMandrioli - 06 Sep 2004

I note that the install has a top-level. Although this is the standard and preferable in the rest of the world, TWikiPackages at twiki.org do not do this: they start, e.g. /bin , /lib directory listing deleted -- TW

Keep up the good work guys! We are behind you all the way!

-- MartinCleaver - 03 Oct 2004

Fixed in 1.0b4

-- RomainRaugi - 10 Oct 2004

Table Handling Bug

When typing a new line in a cell the resultant table is broken. (I realize that this does not work in TWiki ML either, but a user in a WYSWYG mode might not appreciate that. It looks fine in the edit mode.)

-- ThomasWeigert - 31 Oct 2004

Formating Problems

We have seen significant format problems. It surprised me that there are not reports about what we have seen. I made and entry in the Support web: KupuEditorAddOnFormatProblems. Rather than repeat details here, please have a look at that entry.

We see huge potential in this editor and are anxious for it to be working well. Thanks for the work.

-- AlanDayley - 10 Nov 2004

ColasNahaboo and FredericLuddeni are currently working on the TWikiML/XHTML translator used by KupuEditorAddOn. The one used for the moment is a temporary JavaScript version, some elements like verbatim blocks are indeed not well managed.

-- RomainRaugi - 10 Nov 2004

Questions and Answers:

How are you getting the list of available TWiki Variables? Is it hard-coded?

    1. It is sent to editor from a server configuration file.

Are "Tables" pure HTML tables?

    1. Tables are pure HTML tables translated by Java translator into TWikiML tables.

Is there any support for plugins variables (e.g. %EDITTABLE, %ACTION). If not, how hard would it be to add?

    1. First aim of our project is to make easier topic editing for all, so only a subset of variables are supported but this can be changed.

How hard would it be to do the HTML -> TWikiML conversion in something other than Java? For sites where Java is not available (e.g. on hosted installs) this may be important.

    1. Yes Java isn't a good solution. This translator uses DOM tree to perform the translation, so it can be imitate with another language with DOM support. We will not rewrite this translator, but community... smile -- Damien
    2. Hi, I'm writing a Javascript Translator ShortHand <-> XHTML . I think it can be useful. wink -- AurelioAHeckert - 05 Sep 2004

Yes, it can be useful ! Do you plan to translate tables ? It must be difficult with regular expressions...

-- DamienMandrioli - 06 Sep 2004

Tables is not the more dificult... Lists will need more neural nets wink

-- AurelioAHeckert - 06 Sep 2004

Could this setup possibly allow pasting images from the clipboard instead of attaching files?

Our less geeky users seem to like the idea of this editor. But what still doesn't fit into their minds is why they have to save and attach images from the clipboard and cut and paste the link in the page. To do this in the same environment with only a few clicks would make it much easier to use Twiki.

-- PeterSchaich - 29 Oct 2004

The JavaPasteAddOn was designed to do exactly that - paste either images or files into a Java applet running in the browser.

-- MartinCleaver - 29 Oct 2004

Would it also work for the Beijing release?

There's too many differences between Cairo and Beijing, so this will works for Cairo and next versions.

-- CrawfordCurrie - 25 Aug 2004, DamienMandrioli - 25 Aug 2004 -- ThomasWeigert - 01 Sep 2004


Will only edit pages that already exist! Doesn't have other twiki editing functionality, such as Checkpoint, QuietSave, Save, Preview. Tested and running on production release TWiki 02 Sep 2004.

-- AndrewRobson - 03 Mar 2005 (Moved from KupuEditorAddOn topic by RomainRaugi - 03 Mar 2005)

New page edition, Checkpoint, QuietSave and Preview are functionalities that are not managed.

-- RomainRaugi - 03 Mar 2005


Is there a demo running somewhere?

-- PeterSchaich - 23 Sep 2004

Yes, you will find here a basic install of TWiki with Kupu add-on. You can freely edit and save topics.

-- DamienMandrioli - 31 Oct 2004

Add-on topic based on template

Once ready, could you use base your add-on topic on the AddOnPackageHowTo template? Pay attention to WikiWords, better to use Interwiki links if referring to content on TWiki.org.

See my idea of an ideal WYSIWYG editor for TWiki at EasyEditorRevisited#IdealWysiwyg

-- PeterThoeny - 30 Sep 2004

You might like to use Plugins CVS

Its quite easy to set up. Also BuildContrib can help you automate the upload of your releases to the plugin topic.

-- MartinCleaver - 08 Sep 2004


PeterThoeny moved stuff to dev; Martin refactored into a table of contents.

-- MartinCleaver - 30 Sep 2004

Javascript Woes

Not sure if this is the right place for this, but... I seem to have bad luck getting this working. I found a copy of 1.0 beta (31/08/04) and it installs fine and works great, except in IE6. For some unknown reason when i edit a page that doesn't have any HTML yet ( ie one that was just a TwikiML page ) the scripts seem to omit the closing </title> tag in the body of the text. This problem doesn't exist in firefox, and the IE scripts don't break it after it's been set up once with say firefox.

Ok so i was like lets see if there is a new version since the date is a bit old. So i get the newest off the page here b4 and install it and now it doesn't work at all in IE6 and still works in Firefox. There is a script error when i click on the save button "Object does not support this action" in IE and IE having all the wonderful debug info for javascript that it does, i have no idea what is causing this error.

I've repeated this error on like 4 other computers here. I've double checked my file permissions and i think they're right. So i have no idea what is wrong and would greatly appreciate any input if anyone has any ideas.

-- BrentTokarchuk - 22 Oct 2004

I will look at it.

-- RomainRaugi - 22 Oct 2004

Thanks, to add some further detail, the exact error in IE after clicking on the save button is

Line: 80 Char: 5 Error: Object doesn't support this property or method Code: 0

Ok i've narrowed down where the error is occuring. It's in the translation routine on line 80 in the kuputranslator.js file.

it doesn't like these object declarations:

    // permissions
    var metaTags = node.getElementsByTagName("meta");
    var viewPerms = metaTags.namedItem(this.viewPermissionsMetaName).attributes.getNamedItem("content");
    var changePerms = metaTags.namedItem(this.changePermissionsMetaName).attributes.getNamedItem("content");

Hacking the code a bit, it seems that the metaTags object is not getting a valid collection of objects, since it doesnt' seem to recognize the method we are calling on the next line to get our perms etc.

A problem with this section is further proven by the fact that the problem seems to crop up when i've editted a page that has been editted with the kupu editor before. You can go and kupu edit a page that has only been Twiki editted (ie none of the extra HTML added) and it will save. But as soon as it starts searching for the meta tags it seems to die.

Hope this helps.

-- BrentTokarchuk - 22 Oct 2004

Actually, there are two issues, one appearing during TML to WYSIWYG view switching, and one during save. The first one is a IE JavaScript object property issue (kupusourceedit.js line 75). Second issue is a Kupu method (called before translation) that returns an object that has not the same type as the one passed in parameter (in IE, kupueditor.js line 245), this object being given to the translator. Version b4.1 contains fixes for these, in addition to a better management of paragraphs in IE. Thank you for the feedback !

-- RomainRaugi - 26 Oct 2004

This is now looking really good. Question:

  1. When will it be in CVS?
  2. I notice it uses a hacked version of the BuildContrib installer. Is this something I can help with? The installer now supports pre and post install scripts, so hacks shouldn't be required....

-- CrawfordCurrie - 03 Nov 2004

Do you mean KupuEditorAddOn should be registered on a TWiki related CVS ? because it is already registered on a Berlios CVS.

It wasn't clear for us what has to be (or not) modified to generate an installer. This was involuntary.

-- RomainRaugi - 05 Nov 2004

Can't Save In Firefox

JS error line 79 in kuputranslator.js - view permissions has no properties (the .attributes part.getNamedItem part fails):

var viewPerms = metaTags.namedItem(this.viewPermissionsMetaName).attributes.getNamedItem("content");

Saving with alt-s or "OK" when leaving the page doesn't work. Firefox browser settings set to allow all sorts of Javascript nuttery.

Saving problem in 1.0b4

Saving with alt-s or "save & exit" or "OK" when leaving the page doesn't work. No ERROR messages, it just doesn't save any chages.

1.0b3 does save changes, but no encoding convertion done =(

-- SergeySchwartz - 02 Dec 2004

Saving during leaving the page doesn't work. It's a 1.0b4 version mistake at the time of the call of the function which do that. For the moment, save before leaving. It will be fixed with next versions...

-- RomainRaugi - 14 Dec 2004

More feedback

I see we are making good progress!

  • I continued typing 'now what happens' after writing the name of a topic. I got WebHome now what happens? - I was confused as to what would happen to the rest of the topic and what I should do to escape the doing-a-name of a topic?
  • It would be nice if it understood Control-B etc
  • It was delightful to see it complete topic names - once it guesses a match, how do I get it to show me the next match? (e.g. I typed 'Web', it guessed WebChanges, how do I say 'next' to advance me to 'WebPreferences'?)
  • It seemed to add blank lines when I did successive manual bullet points (i.e. " *" in Kupu)
    • Is it possible to mix-mode kupu and twikiML?

-- MartinCleaver - 14 Dec 2004

  • Link issue: It was on Firefox ? IE ? Does it happen frequently ?
  • Completion: To show next match, you have to type another letter. For example, if you type WebP it should show WebPreferences. This function was the most difficult part (IE and Firefox ways of doing that differs and they weren't easy), we're pleased to read your remark.
  • Bullets: It's not possible to mix-mode Kupu and twikiML. Doing that is difficult and we don't think it worth it.

-- RomainRaugi - 14 Dec 2004

  • Link issue: I've got this too on IE6 on your Kupu demo site, but it's not consistant. Now, I'm having trouble replicating it.
  • Link usability: I'd like the completion of links te be bound to an obvious key, like Tab, Enter or space. Now it's not very intuitive in my perception.

-- JosMaccabiani - 11 Feb 2005

i ┤ve got a saving problem: saving from Kupu does not work at all for me. browser software or version does not matter. i am working with twiki version 'Version: 30 Oct 2004 $Rev: 1794 $' and the current version of the kupu-addon (available on twiki.org). i looked around in the code but the only strange point i found is in 'kupu_html2twiki', there is the 'my $saveCmd = "";' empy. when i hit save the status message in the browser says always "Please wait while saving document..." but there is no change. any idea to go for?

-- UweFranke - 10 Jan 2005

Got a similar one, when a previous install was working. using 1.0b4.2

-- LucAbom - 12 Jan 2005

I seem to be the only one so far that has noticed the particularly nasty formatting bug using Kupu (Possibly cut/paste bug). Whenever I paste HTML or Rich Text in to Kupu, it looks fine, but when I press the "save" button, it inevitably gets mangled. Sometimes it duplicates sections a few times, and sometimes it removes the formatting all together? Has anyone else experienced this?

-- JayFrankenberger - 18 Jan 2005

Can we strip this down and get limited functionality to be production-ready? I think this would allievate the existing developers of the tireless pursuit of perfection, get something tangiable out the door and give us a piece of functionality we'd all love to have?

Can someone give us a quick overview of what is complete and which bits aren't quite ready yet?


-- MartinCleaver - 28 Feb 2005

As you must have noticed, we stopped the development of KupuEditorAddOn. A b1.5 version is available on CVS though, cleaner than this one and much easier to work on), but not ready to be deployed... This last version uses the new Perl translator developped by FredericLuddeni. The JavaScript translator we adapted from the Java version was the cause of several bugs and therefore has been removed, as well as the TWiki Shorthand edition (disabled).

We are open to any questions regarding the development of this project...

-- RomainRaugi - 01 Mar 2005 -- DamienMandrioli - 01 Mar 2005

How to update from CVS?

Stopped development is a bad thing.

We are using TWiki extensively among the software engineers but not having WYSIWYG editing is a huge impediment to further adoption. There are some (silly hardware guys) who simply refuse to learn or use TwikiML, period. The director is now talking Lotus Notes... ugh.

That said, we currently have 1.0b4.1 installed and I'd love to try the CVS version you speak of in your missive directly above. What is the easiest and safest way for me to install this newer version over my current install? That would include directions for downloading from CVS and installing to my server.

Thanks for all your work so far! I really don't want to see this effort die. Not being a Perl or Java programmer, I don't think I can help with coding but I am more than happy to test!

-- AlanDayley - 01 Mar 2005

I see a WYSIWYG editor as an important enhancement for TWiki. We should get one sooner then later, it is a competitive question / makes TWiki more appealing to prospects. (Although I have seen that this is a lower priority for people used to the TWiki markup)

If nobody follows up with the TWiki/Kupu integration we should IntegrateHtmlAreaEditor as an alternative.

-- PeterThoeny - 02 Mar 2005

We are just experimenting with twiki and this is a BIG help to some of our staff. I think stopping development is a bad thing. This add on is MUCH better than the IntegrateHtmlAreaEditor because it doesn't render all your TWikiML into HMTL. I see rendering to HTML loses some of the benefit for easy reorganization of the wiki since certain things get converted to html links instead of rendered dynamically. What is the reasons for ending development of this editor?

One problem I have run into is when I save a page, the change is being made as TWikiGuest instead of the person I have logged in as. Is this a bug in KupuEditorAddOn The installation? Any help is appreicated.

-- RickMach - 03 Mar 2005

Any volunteers to take this over? Its clear that this needs a fresh push; hopefully Romain and Damien will be able to detail where the complexity is, give you direction and tell you what pitholes to avoid.

-- MartinCleaver - 04 Mar 2005

If this project has indeed stalled we need to mark its status on the KupuEditorAddOn to reflect that: others will only rally if they know that they are not stepping on Romain and Damien's toes.

Guys, do you want a break and the help of others?

-- MartinCleaver - 07 Mar 2005

As we said, we stopped to work on Kupu For Twiki. We expect someone would continue the project, maybe by using last version of Kupu but this is not simple. It is necessary to well know TWiki structure, Perl and Javascript. The most difficult task is debugging (90% of time).

-- DamienMandrioli - 08 Mar 2005

Could you please put every asset you have generated that could help other developers continuing this work on the twiki.org? Please also give enough instructions that somebody could get started....

-- ThomasWeigert - 08 Mar 2005

I create a KupuEditorAddOnDevContinuing topic dedicated to KupuEditorAddOn development continuing.

-- RomainRaugi - 09 Mar 2005

I would like to change the default font in the Kupu editor window to use Arial instead of what it uses by default (Times New Roman?). It would seem this change would need to be made in kuputwiki.css , but I've not had any luck with my modifications there. Has anybody done this?

-- AdamEllis - 15 Mar 2005

I am possibly going to pick up on this development on behalf of a client. Please let me know (in this topic) of any issues you have encountered, questions, or functionality requests, and I'll do my best to incorporate them.

-- CrawfordCurrie - 06 Apr 2005

Crawford, this is very good news for the TWikiCommunity!

-- PeterThoeny - 07 Apr 2005

Hi, I would like to share a problem I have encountered with Kupu Editor. I am using Twiki on a site with $siteLocale = "pl_PL.ISO-8859-2". Now if I want to edit a site with Kupu Editor it returns me the following error in apache error log.

kupu_html2twiki: Usage: Encode::FB_PERLQQ() at /usr/share/perl5/TWiki/Contrib/KupuEditorAddOn/Html2TWiki.pm line 67.

Looking at the source code I found:

$text = Encode::encode( $charEncoding, $text, &FB_PERLQQ );

I do not understood the &FB_PERLQQ part so I tried replacing the line with:

$text = Encode::encode( $charEncoding, $text);

Now everything works :). Is it OK to leave it like this?

To reproduce the error please do:

Clead TWiki install.
** Polish support
# vi /etc/twiki/TWiki.cfg
$useLocale = 1;
$siteLocale = "pl_PL.ISO-8859-2";
$localeRegexes = 0;

** Plugin wyswing editor
# cd /var/lib/twiki
# wget http://twiki.org/p/pub/Plugins/KupuEditorAddOn/KupuEditorAddOn.zip
# unzip KupuEditorAddOn.zip
# perl KupuEditorAddOn_installer.pl install
# chmod 755 bin/kupu*
# vi /var/lib/twiki/templates/view.pattern.tmpl
Add somewhere
<a href="%SCRIPTURLPATH%/kupuedit%SCRIPTSUFFIX%/%WEB%/%TOPIC%">Kupu Edit</a>

And enter some of the ISO-8859-2 charakters (like &#322;ˇ&#378;&#263;&#380;)

Very fine editor by the way.

Praise to CrawfordCurrie! We are pushing ahead with integration of the wiki deeper into our processes. This will force the reluctant to use it but WYSIWYG editing will help tremendously.

I hope that my unanswered question, KupuEditorAddOnFormatProblems, will help you see the main reasons why we cannot kupu successfully. Earlier in this same topic I asked how to get to install the last CVS version but got no answer. I'd be happy to help with testing, given some direction.

-- AlanDayley - 06 May 2005

Thanks Alan - as soon as I'm ready for live testing I'll ping you. Progress report:

  1. I have recoded the TML -> HTML and HTML->TML translators, and written reasonably vast unit tests for them (which they pass). This is checked into CVS under WysiwygPlugin (the name is changed because this code is not kupu specific - it should work with any of the HTML editors that understand CSS).
  2. I have downloaded kupu 1.2.1 and have started the process of mergeing in the code.

-- CrawfordCurrie - 07 May 2005

Awseome news Crawford! Wish that I could contribute in a meaningful way. frown

-- MattWilkie - 10 May 2005

Really good news. Just a small annoyance: Kupu breaks topics adjusted for SectionalEditPlugin.

-- PeterSchaich - 11 May 2005

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatEXT kupu_attachments r1 manage 5.8 K 2005-03-18 - 16:53 DanBoitnott Modified attachment script to work with Perl's taint mode
Edit | Attach | Watch | Print version | History: r59 < r58 < r57 < r56 < r55 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r59 - 2005-05-11 - FranzJosefSilli
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.