chi wrote:
FCKW doesn't require Perl as well. The Perl dependency for the DokuWikiFCK editors is due to the fact that you have to convert the HTML the editor produces to wiki format before it's saved and when it's read. And there's already a nice Perl lib which does exactly that.
Hi chi,
I know, I did install it and tried it. FCKW is nice and working but I needed something smaller and easier for customization.
Also, most of its features are not needed for the DokuWiki.
chi wrote:
That sounds nice! how do you convert back/forth from wiki format to HTML? Or do you let it write wiki markup from the start?
The scheme is the following:
On loading editing page in Dokuwiki is started NicEdit, which is written in javascript. It overlays the editing window (textarea), and takes hold on the text which was passed from Dokuwiki. Inside NicEdit is fired an event to convert text (which is in Doluwiki markup) into html. This is where conversion from Dokuwiki to html takes place. After conversion, user can edit the page. After pressing the preview or save button is fired event to convert from html to Dokuwiki markup, and the proper routine inside NicEdit is executed which writes back the converted text into textarea of the editing page. This text is passed back to the DokuWiki's server-side php script etc.
There is a button in NicEdit, which allows user to edit the page in the original Dokuwiki markup, that is, source editing.
It allows to correct any issues one may have with improper styles and markup when editing in the wysiwyg mode.
My mods for integration require some code modification in the form.php and html.php in Dokuwiki files, which add NicEdit javascript on the editing page. Also, I rewrote some parts of NicEdit's code to better integrate it with Opera, FF and IE (Safari is untested yet, although it should be working fine).