FCKW Dokuwiki Plugin

FCKW Dokuwiki Plugin

This is the home page for the FCKeditor/Dokuwiki integration project.

The current stable release version is 0.7.3 and it was published on June 30th, 2008.

Yet another WYSIWYG Dokuwiki Plugin

FCKW is the result of the intension to combine one of the best html wysiwyg editors (FCKeditor) with a good and well maintined wiki (Dokuwiki). It's name can be seen as the concatenation of both these things: FCKeditor and Dokuwiki. A `best of breed` approach, obviously.

The choice of tools used was based on two imperatives:

  • open source: the used tools needed to be open source.
  • maintenance: the used tools needed to be well maintained.

Why WYSIWYG

To nerds and geeks like myself, the following question keeps popping up: "Why would anyone want a wysiwyg editor in a wiki?"

The answer is easy: Because not everyone who needs a wiki, understands the beauty of wiki syntax. And to most people, the wiki syntax is a major drawback to using a wiki.

Since the 0.2 release, the user has the possibility to switch between wysiwyg and wiki syntax while editing.

Why FCKW

There are already various attempts to integrate the FCKeditor into Dokuwiki. So what does the FCKW plugin do, what others can not?

The FCKW plugin stores the pages in wiki syntax. This gives the user the possibility to switch back to a regular Dokuwiki, without loosing anything. And should Dokuwiki ever include it's own wysiwyg editor, all you'd need to do, is remove the plugin, and you'd be back on track.

You can also switch back to the wiki syntax while editing

Demo

http://fckw.demo.liip.ch/

Installation

Please refer to the installation documentation for installation documentation.

License

License: GNU GPL v2.

Contact

Should you have any comments or suggestions, feel free to contact me on my e.mail: pierre.spring@liip.ch

Changelog

  • June 30th, 2008 - version 0.7.3:
    • integrated the security token
  • May 26th, 2008 - version 0.7.2:
    • fixed drafts system
    • added support for the discussion plugin
    • many bug fixes
  • January 24th, 2008 - version 0.4:
    • added support for dokuwiki installations that use nice url's with .htaccess
    • added support for dokuwiki installations outside the document root
    • added footnote support
    • restricted indenting to lists
    • improved tables support
    • improved links support (external, interwiki, windows share, ...)
    • many smaller bugfixes
  • January 18th, 2008 - version 0.3:
    • added native dokuwiki mediamanger to the FCKeditor (!!!)
    • images alignement in FCKeditor
    • improved links and images handling
    • added support for many syntax elements: monospace, smileys, non-parsed blocks, embedded html and php, code blocks (incl. highlighting), control macros (~~NOTOC~~, ~~NOCACHE~~), ...
    • many minor bug fixes
  • December 21st, 2007 - version 0.2:
    • switch to wiki syntax while editing
    • bug fix: restore pages
  • November 29th, 2007 - version 0.1: Initial release

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Feb 12, 2008

    Anonymous says:

    this is great\!\!\! thank you for sharing it. one suggestion, it would awesome i...

    this is great!!! thank you for sharing it.

    one suggestion, it would awesome if one could create links to pages (not images) by browsing (perhaps with a modified version of media manager) instead of typing in the link itself. An option to create a new folder/namespace should also be provided if the desired namespace does not yet exists. 

  2. Feb 27, 2008

    Anonymous says:

    Pierre, is the 0.9 tag released?

    Pierre,

    is the 0.9 tag released?

  3. Apr 15, 2008

    Anonymous says:

    You may add <input type="hidden" name="sectok" value="<?php echo getSecurityT...

    You may add
    <input type="hidden" name="sectok" value="<?php echo getSecurityToken()?>" />
    just after
    <input type="hidden" name="suffix" value="<?php echo formText($SUF)?>" />
    in /path/to/doku/lib/plugins/fckw/action/edit.php
    to allow this plugin to work with the last dokuWiki version.

    1. Apr 29, 2008

      Anonymous says:

      Nice one! Thanks a lot!

      Nice one! Thanks a lot!

      1. May 07, 2008

        Anonymous says:

        Thank you very much this made the warning about security tokens and possible CSR...

        Thank you very much this made the warning about security tokens and possible CSRF attacks disappear!

        Additionally, I had to change DokuWikiFCKW to DokuWiki in action/save.php as described in another forum.

        Could you please integrate these changes in a new release of fckw?
        There has also been a new release of Dokuwiki recently (2008-05-05).

        1. May 07, 2008

          Anonymous says:

          Arrgh, I just found that FCKW destroys the content of other plugins, like bibtex...

          Arrgh, I just found that FCKW destroys the content of other plugins, like bibtex, latex, or doodle.

          I.e., foreign environments like <latex></latex>, <code></code>, <bibtex></bibtex>, etc should be ignored when saving text

    2. May 13, 2008

      Anonymous says:

      Hi, I've made this changes, but it doesn't work with dokuwiki20080505 version. T...

      Hi,

      I've made this changes, but it doesn't work with dokuwiki-2008-05-05 version.
      That's make just delete the page...

      Have you any solution?
      Thx in advance,

      (Excuse me for my english) 

  4. Apr 17, 2008

    Anonymous says:

    Hello, the windows share links are somehow converted after saving the page. I'm ...

    Hello,

    the windows share links are somehow converted after saving the page. I'm not able to create a link to a folder/document within the network.
    my steps:
    use "link" function within editor
    create windows share link with unc path
    after "ok" it looks like it should
    after ssaving the page it's converted to a "non-existing page link".

    Can anybody help on this?

    regards

    Joe

  5. May 03, 2008

    Anonymous says:

    This would be a cool editor ... but czech characters are lost when editing This:...

    This would be a cool editor ... but czech characters are lost when editing

    This: +?š??žýáíé= is replaced by +?š??žýáíéé

  6. Jun 03

    Anonymous says:

    Love this plugin. But currently I have a conflict with another plugin. It's the ...

    Love this plugin. But currently I have a conflict with another plugin. It's the ajax chat plugin from http://blackdaemon.no-ip.org/wiki/dokuwiki:plugin:chat, modified to work with 2008-05-05 dokuwiki.

    When I enable the chat plugin, in firefox and opera the fckw plugin comes up with the source view (in html) but there is no menu. I can type in it, and it saves just fine, but no menu and no wysiwyg. But it still works in ie, just fine. When I disable chat, it works on all browsers. Also, the chat plugin is loaded by a ~CHAT~ comment in the page. This is happening on all pages, regardless of the comment.

    So how does an unloaded plugin effect another one? If anyone has any ideas I'd appreciate it. Thanks.

  7. Jun 06

    Anonymous says:

    Hi, good work. This Plugin is really nice. Anyway, I noticed some problems: 1. C...

    Hi,

    good work. This Plugin is really nice.
    Anyway, I noticed some problems:

    1. Code like for example hello world:
    <code c>
    #include <stdio.h>

    int main(void)
    {
    printf("Hallo Welt!\n");
    return 0;
    }
    </code>

    This gets replaced by:

    <code>
    #include int main(void)

    Unknown macro: { printf("Hallo Welt!n"); return 0;}

    </code>

    by editing the page again. (see your sandbox)

    2. Other Plugins like ODT that you can use vio
    ~ODT~
    This "special" Tag gets also "destroyed"

    Is it possible to modify your plugin so that this is working?

    Thanks in advance,
    Dirk

    1. Jun 08

      Anonymous says:

      Ya, I notice this problem too. Seems that when the file gets processed (by fckw ...

      Ya, I notice this problem too. Seems that when the file gets processed (by fckw or after, I don't know) if it reaches a ">" (or a "<"?) inside the <code> block, it will cut off a section (or more). So either the editor or the post process is not parsing it right. Even happens if you view a correct page in fckw and then switch to wiki format. Part(s) of the page will be gone.

      Trying this code, the for loop line will show "for($i=0;$i" and then continue somewhere down the page.

      <code>
      ...
      my $current = '';
      my $istext = 0;

      for($i=0;$i<length($line);$i++){
      if($chars[$i] eq $quote){ #handle quote chars
      ...
      </code>

      matt

  8. Jun 18

    Anonymous says:

    I have also this problem... The FCKW destroys the content of other plugins like ...

    I have also this problem...

    The FCKW destroys the content of other plugins like note,

    I have test by add note tag in fckconfig.js
    FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var,note' ;

    And don't take effect..

  9. Jun 26

    Anonymous says:

    This "CPAN HTML::WikiConverter package" requirement really prevent installation ...

    This "CPAN HTML::WikiConverter package" requirement really prevent installation on most web host.

    Why don't you just modify the fckeditor for mediawiki to work with dokuwiki.

    All the html conversion are done via fckeditor + javascript so no extra package to install. You can also quickly change between wysiwyg and wikitext. They has made a lot of improvement that allow this to work correctly even on IE6.

    Check out the SANDBOX page.

  10. Jun 28

    Anonymous says:

    Thanks for a great addition to Dokuwiki I found fckw to work well if I use it to...

    Thanks for a great addition to Dokuwiki - I found fckw to work well if I use it to edit and switch to "wiki syntax" to add markup for incompatible plugins (note and ODT). The problem with this workaround is that when I go back to edit the page again, it loads into FCK and all the incompatible markup is lost - While it would be great if all the plugins wrre compatible, as a workaround and generally useful feature, would it be possible to have an option to open editing with "wiki syntax" instead of just defaulting to FCK?

  11. Jul 03

    Anonymous says:

    Hi, first I want to thank you for this nice plugin. But I have to questions: 1. ...

    Hi,
    first I want to thank you for this nice plugin.
    But I have to questions:
    1. How could I create Tableheaders like the wiki syntax ^ hallo ^ foo ^
    2. The windows links doesn't work. Everytime I save the site I'll get wiki links.
    Regards

    Paul

  12. Jul 16

    Anonymous says:

    Aaaaahhhhhh. I've been so frustrated trying to get a wysiwyg to work and I am so...

    Aaaaahhhhhh. I've been so frustrated trying to get a wysiwyg to work and I am so close....

    I am trying to paste some documentation from word which works perfectly in your "sandbox", but when I do it on my site and look at the source, I get a lot of   all through my docuement. Please help.....

    1. Jul 16

      Anonymous says:

      Ahh. Sorry, just realised what I did. Used different browsers. Just one other th...

      Ahh. Sorry, just realised what I did. Used different browsers. Just one other thing which I've just realised. The "works perfectly" was not entirely true. When I pasted from word, I had some text in a text box which looks good when editing it, but seems to disappear when pressing save. It also happens in your "sandbox"
      Thanks again.

  13. Jul 20

    Anonymous says:

    Has anyone gotten the HTML2WIKI to load correctly on a funplug enabled DNS323? I...

    Has anyone gotten the HTML2WIKI to load correctly on a funplug enabled DNS-323? I have 'make' and 'perl' installed but can't get "perl -MCPAN -e 'install HTML::WikiConverter::DokuWiki'" or the manual install with 'make' to work.

    Manually I got all sorts of dependency errors:

    # *perl Makefile.PL*
    Warning: prerequisite CSS 0 not found.
    Warning: prerequisite Class::Data::Inheritable 0.02 not found.
    Warning: prerequisite HTML::Element 0 not found.
    Warning: prerequisite HTML::Entities 1.27 not found.
    Warning: prerequisite HTML::Tagset 3.04 not found.
    Warning: prerequisite HTML::Tree 3.18 not found.
    Warning: prerequisite Params::Validate 0.77 not found.
    Warning: prerequisite URI 1.35 not found.
    Warning: prerequisite URI::Escape 0 not found.
    Writing Makefile for HTML::WikiConverter

    When I run "*perl -MCPAN -e 'install HTML::WikiConverter::DokuWiki*" I get the following errors...

    Can't locate object method "data" via package "CPAN::Modulelist" (perhaps you forgot to load "CPAN::Modulelist"?) at (eval 11) line 1.
    at /ffp/lib/perl5/5.8.8/CPAN.pm line 3405
    CPAN::Index::rd_modlist('CPAN::Index', '/mnt/HD_a2/ftp/.cpan/sources/modules/03modlist.data.gz') called at /ffp/lib/perl5/5.8.8/CPAN.pm line 3128
    CPAN::Index::reload('CPAN::Index') called at /ffp/lib/perl5/5.8.8/CPAN.pm line 675
    CPAN::exists('CPAN=HASH(0x6e3a3c)', 'CPAN::Module', 'HTML::WikiConverter::DokuWiki') called at /ffp/lib/pe rl5/5.8.8/CPAN.pm line 1841
    CPAN::Shell::expandany('CPAN::Shell', 'HTML::WikiConverter::DokuWiki') called at /ffp/lib/perl5/5.8.8/CPAN .pm line 2077
    CPAN::Shell::rematein('CPAN::Shell', 'install', 'HTML::WikiConverter::DokuWiki') called at /ffp/lib/perl5/ 5.8.8/CPAN.pm line 2164
    CPAN::Shell::install('CPAN::Shell', 'HTML::WikiConverter::DokuWiki') called at /ffp/lib/perl5/5.8.8/CPAN.p m line 79
    CPAN::AUTOLOAD('HTML::WikiConverter::DokuWiki') called at -e line 1

  14. Aug 10

    Anonymous says:

    Hi, Fist I'd like to congratulate the effort of integrating FCK with dokuwiki, i...

    Hi,

    Fist I'd like to congratulate the effort of integrating FCK with dokuwiki, it's a great job but the latest build simply breaks all the pages that use third party plugins.
    All my youtube embeded player tags get converted to a simple external link for instance.
    Does this issue rings a bell to anyone ?
    Is it the build that is completely broken or some incompatibility with one of my plugins ?

    Best Regards,

    Michel Courtine

    http://michak.net

  15. Sep 03

    Anonymous says:

    Just a little rant... While I appreciate the effort made by the authors of this...

    Just a little rant...

    While I appreciate the effort made by the authors of this plugin it doesn't work on my system ...

    Just as indicated in many other comments: my dokuwiki pages gets deleted when I try to use the editor, and i'm pretty sure it comes down to the cpan module not being installed properly

    so here goes my rant:

    Implementing perl on windows is UTTER crap!!

    I have been trying now for 12 hours to get the f*cking cpan module loaded into my perl installation on xp pro (i'm using xampp), i.e C:\>xampp\perl\bin\perl -MCPAN -e "install HTML::WikiConverter::DokuWikiFCK".. using this method it keeps failing with:

    Alert: While trying to 'parse' YAML file
    '\xampp\perl\cpan\FTPstats.yml'
    with 'YAML::XS' the following error was encountered:
    Usage: YAML::XS::LibYAML::Load(yaml_str) at C:\xampp\perl\lib/YAML/XS.pm line
    70.

    Then I have searched for alls sorts of methods for doing a manual install, tried making a ppm package and so on .. none worked... This seemingly simple task is just so incredibly badly documented.

    Yes, i'm a newbie to perl, but do a little php, which is just 1000 times better documentated. Perl really sux!!

    As I stated, this is not directed at the authors of the plugin as it is not their fault.

  16. Sep 14

    Anonymous says:

    Could it be posible to have a 100% php solution? This will really help shared ho...

    Could it be posible to have a 100% php solution? This will really help shared hosting and resource usage by only having 1 code to compile in the server.

    Maybe this could help:
    http://pear.php.net/package/Text_Wiki

    BTW, I just registered in liip.ch and could not login here.

    Thanks
    Oliver
    http://tinymailto.com/oliversl <-- my email after a captcha

  17. Sep 16

    Anonymous says:

    Hi, really nice plugin. BUT\! We have problems with tables. If you insert 0 (zer...

    Hi, really nice plugin. BUT! We have problems with tables. If you insert 0 (zero) into cell and save the page, this 0 disappears and the cell is empty. I don't know where is the problem. If I try the mediawiki FCKEditor, it works good.

    Thanks for answer,

    Pavel

  18. Sep 17

    Anonymous says:

    I am trying to get this plugin to work, and I finally found out why it will not....

    I am trying to get this plugin to work, and I finally found out why it will not. It has been failing similarly to some people above in that it would not save if edited in the FCKeditor. The saveFCK.pl script faiils. I turned debug on and it can not find HTML::WikiConverter. HTML::WikiConverter script html2wiki works fine standalone before I try editing.

    I know why because I have two installs of perl on my machine /usr/bin/perl(5.8) and /usr/local/bin/perl (5.10). I want to use the /usr/local/bin/perl install because the other is the system os install which I have to leave because it is required for a lot of system prerequisites. For some reason the scripts will use /usr/bin/perl; the newer version I installed is in /usr/local/bin/perl. I tried to explicitly to require using /usr/local/bin/perl but it doesn't seem to work.

    I don't know a lot about perl, but how can I change it to so that it finds the right perl. My paths are set to find /usr/local/bin first for the web application user. The weirdest thing about this is afterward html2wiki doesn't work I get this error message.

    Can't use string ("ANY") as a HASH ref while "strict refs" in use at ./html2wiki line 85.

    Thank you.

    1. Sep 17

      Anonymous says:

      Oops my bad. I had two pages up. My problem is with the other plugin. Sorry.

      Oops my bad. I had two pages up. My problem is with the other plugin. Sorry.

  19. Sep 18

    Anonymous says:

    Hi, love the plugin. Just an idea would it be possible to remove the Perl depend...

    Hi, love the plugin. Just an idea - would it be possible to remove the Perl dependency with PHP's built-in XML parsing (afterall, FCK already produces XHTML)? It seems like converting XML to Wiki should be pretty straightforward. I've been using a method that starts like this with decent success:

    $parser = xml_parser_create();
    xml_set_element_handler($parser, 'startElement', 'endElement');

    function startElement($parser, $name, $attrs)
    {
    switch($name) {
    case "H1":
    $this->output .= "====== ";
    break;
    ...

    This method might fall apart on complex inputs.. but for the basic formatting it seems to work fine.

    Anyway, just an idea. Thanks for the great plugin.

  20. Oct 01

    Anonymous says:

    Anything between angle brackts (less than/greater than) ist getting lost. <someX...

    Anything between angle brackts (less than/greater than) ist getting lost.
    <someXml>foobar</someXml>

    In other news: greatest. plugin. evar.

  21. Oct 07

    Anonymous says:

    There is a flaw in /action/save.php, line 55: echo $lang'draftdate'.' '.date($...

    There is a flaw in /action/save.php, line 55:

    echo $lang'draftdate'.' '.date($conf'dformat');

    Current versions of DokuWiki use strftime() syntax for the date format, so it should be:

    echo $lang'draftdate'.' '.strftime($conf'dformat');
  22. Nov 06

    Anonymous says:

    Thank you for the nice plugin! I have a suggestion for an addition: It would be...

    Thank you for the nice plugin!

    I have a suggestion for an addition:
    It would be nice to have another way to switch between wysiwyg editing mode and wiki markup (quick tags) editing mode.
    With your plugin switching to wiki markup mode is cumbersome. I would suggest something like in moinmoin wiki where you have two edit buttons ("Edit" and "Edit GUI") so different users can easily and quickly choose how they want to edit a page.

    Regards
    Tom

  23. yesterday at 06:36 PM

    Anonymous says:

    "many bug fixes" > Not really an usefull comment. What are the bugfixes? Current...

    "many bug fixes" -> Not really an usefull comment. What are the bugfixes? Currently I'm having problems with this plugin specially with bullets and lists. When I use the normal wiki sintax, I see correctly the numered list; however, when editing the document by using this WYSIWYG editor, it will change the whole numeration. It would be usefull to see a real changelog.

Add Comment