How can I allow my users to edit PmWiki pages with a word processor-like interface?
While I would still consider this a beta version, it's pretty stable and very useful.
A lot of users (see pmwiki-users maillist) experience great difficulties after installing this RichEdit recipe. They all complain of losing all contents after using the RichEdit script. None of these questions seems to be answered :-(
Installing the rich text editor is relatively easy, but requires copying files to a number of locations. Because the recipe uses Perl scripts, you may have to ask your web host where to put them (most often the cgi-bin directory).
For more detailed information on the technical goals, decisions, and problems associated with this recipe, read the Detailed Summary included in the pmwiki/wiki.d directory of the distribution file.
What you need to have
RichEdit recipe for PmWiki
To start off, you'll need this recipe. The download includes both Perl and PHP scripts.
The WikiConverter script requires the following Perl modules, which are not included in the archive above:
If you have a Debian system, execute the following commands from a command prompt to install perl:
1. apt-get update 2. apt-get install perl
This will install perl on your system if it is not already there and include it in the normal path of the system.
From a *nix command shell, you can use: perl -MCPAN -e shell install HTML::Tree ... ans so on.
Your web host may have some or all of these modules already installed. Otherwise, you can obtain them from CPAN.
Installation instructions will vary based on your individual setup, but extracting the files beneath your cgi-bin directory, with the directory structure following the namespace often works. For example, HTML::Tree would be extracted to the cgi-bin/HTML/Tree directory.
Where to put it
Extract the richedit zip file as follows. Unless you have a previous version of this recipe, you should not be asked to overwrite any files.
On a Debian linux system, the zip file is usually downloaded to the users home directory. When it is unzipped, the files will be created in separate subdirectories in that directory. For those of you that are not especially skilled with linux, the following steps will be necessary to implement RichEdit (please note that all of the following commands are executed from the users home directory):
1. make sure you are in your home directory 2. su (then enter the root password) 3. apt-get update 4. apt-get install unzip 5. unzip richedit.zip 6. mkdir /usr/lib/cgi-bin 7. chmod 755 /usr/lib/cgi-bin 8. cd cgi-bin 9. chmod -R 755 cgi-bin/ 10. mv * /usr/lib/cgi-bin/. 11. chmod -R 755 pmwiki/ 12. cd pmwiki/ 13. If you have not done so, create a cookbook directory in the subdirectory containing the pmwiki files. On my system, it is located at /var/www/wiki. 14. mkdir /var/www/wiki/cookbook 15. chmod 755 /var/www/wiki/cookbook 16. cd cookbook/ 17. mv * /var/www/wiki/cookbook/. 18. cd .. 19. chmod -R 755 wikilib.d/ pub/ (please note that there is a space between the two subdirectories) 20. mv wikilib.d/ /var/www/wiki/. 21. mv pub/ /var/www/pub/. 22. cd /var/www/wiki/cookbook/
One last thing must be done on a Debian system. Edit the file richedit.php/. At line 98, change the line to read:
SDV($RichEdit_PerlDirectory,'/usr/lib/cgi-bin/'); (this sets the path to the cgi-bin subdirectory)
The foregoing script was what it took to get the RichEdit function to work in Debian linux. Please also modify the config.php file in /var/www/wiki/local as described below.
Perl WikiConverter Script
Extract these files into a directory where you are permitted to execute Perl files, such as cgi-bin.
- You may have to adjust the line at the top of WikiConverterWrapper.pl to reflect the location of the Perl interpreter.
- Make sure that all of the *.pl and *.pm files are given execute permissions.
Comprehensive instructions for installing Perl modules are beyond the scope of this document. However:
- If your host does not have another installation procedure, you should probably put them in a directory where you are permitted to run Perl scripts.
- All scripts should be given execute permissions. Contact your host for more information.
What you need to configure
config.php (located in /var/www/wiki/local)
- Add the line "include_once('cookbook/richedit.php');" to local/config.php.
- Add the line "include_once('cookbook/wikistylesascss.php');" to local/config.php.
- Add the line "
$PageEditForm= "RichEdit.EditForm";" to local/config.php.
- PLEASE GIVE AN EXAMPLE $RichEdit_PerlDirectory should be set to wherever you moved the files from the cgi-bin directory in the archive.
(go to your ...\pmwiki\cookbook\richedit.php and then do a search for RichEdit_PerlDirectory)
- DITTO Use RichEdit_DoNotEditMarkup( $id, $pattern ) to prevent mangling of your custom markup.
(go to your ...\pmwiki\cookbook\richedit.php and then do a search for RichEdit_DoNotEditMarkup)
Notes and Comments
''The newest the latest. And please don't forget to end by date and name. Thanks
See RichEditBugs for an issue I'm seeing with it, using ActivePerl and the FixFlow skin.
Other RichEditBugs have been entered by users there, as well.
Added a detailed script on how to install on a Debian linux system. 19 February 2007 at 11:35 PDT by RCG
dw September 22, 2005, at 02:02 AM
More problems added
bengibollen October 23, 2005, at 04:08 PM
Still more problems added by EW 25.10.2005
One problem reported. by liuxy 2005-12-29
Is there a demo for this? It sounds like what I've been looking for, but I'm curious how well it handles pictures in a page. Thanks! stormspotter 2006-01-26
- How do I upgrade to a newer Version of TinyMCE.
- How do I expand the number of supported tags. I am looking for
Was anybody ever able to bring RichEdit up'n'running without any errors?
I got to stage where pages can be saved, however there's CSS stylesheet stuff appended.
Sep 15 2006 Philipp Currently I am setting up a WikiFarm with pmWiki and RichEdit. As RichEdit is not implemented to fit in a WikiFarm structure it needed a lot of customization, e.g. the paths. Due to our intranet restrictions I am setting up pmWiki on a WindowsXP/2003 Server with IIS, PHP5 and ActivePerl 5.6. If you find yourself in a similar environment be sure to set the paths right, e.g. "\Inetpub\wwwroot\cgi-bin".
Now I am suffering RichEdits misbehavior as it truncates the last line of text (usually a paragraph), if the line is not "confirmed" with a cariage return. So once saved, reloaded into the editor the last line will also just be truncated. I suspect the Perl-HTML-to-Wiki-Converter to be the problem. Does anybody have a clue what might cause this? Please contact me at geez18 (at) yahoo (dot) com
September 22, 2006 - Jon I'm working on setting RichEdit up on PmWiki on a closed LAN (not on a WikiFarm) but with a similar machine setup as the post above. I'm using Windows Server 2003, IIS 6, Active Perl 5.8.8, and PHP5. RichEdit displays and edits fine, but when I try to save anything (changed or unchanged text on the edit page) the "?action=edit" reloads as a blank page. No changes are saved, the wiki page that was being edited remains in its previous state. I am not getting any error output. Does anyone have an idea what could be causing this?
If so, please contact me: jonmcclure <at> gmail (dot) com.
September 25, 2006 - Philipp Using the new version HTML::WikiConverter (0.61) http://diberri.dyndns.org/wikipedia/html2wiki/ this cookbook works fine. As ActivePerl 5.6 on my Windows server does not include certain packages required by HTML::WikiConverter (0.61), e.g. UTF8, my colleage Christian Georgi kindly modified it. You can download his modified version cgi-bin_WikiConverter_061.zipΔ. To install it just read the simple instructions written in the README.txt.
If you are using ActivePerl 5.8, it is possible that you need to download the packages HTML::WikiConverter (0.61) and HTML::WikiConverter::PmWiki (0.51) from CPAN http://www.cpan.org and compile it for your version of Perl.
Installing on a Mac? 18 Jan, 2007 - Stuart Has anyone tried to install this on a mac? I keep getting a blank where the editing fields are supposed to be. I have been unable to get an install up and running. any help email stuartw <at> apple dot com
date of publication : 2005-09-15 : RichEdit - version 0.1
- Russell Bailey: The author of this recipe, Russell searched out, picked, and glued together the software needed to create the rich text editor. His work consisted primarily of substantially extending the HTML->Wiki converter and writing a lot of wrapper and postprocessing code for PmWiki.
- David Diberri: David wrote the original Perl HTML2Wiki script and PmWiki dialect. This work saved Russell weeks of time and hair-tearing.
- The Xinha and HTMLArea teams: The original editor supported by this recipe was Xinha , a descendent of HTMLArea . Xinha is a big project and a huge achievement, and these folks deserve some accolades.
- The TinyMCE team: After working with Xinha for several weeks, I decided to switch to TinyMCE as my own editor of choice. In my testing TinyMCE was somewhat more stable, a little easier to customize, and a lot faster than Xinha.