[dokuwiki] Re: Thoughts On FCKW

This looks indead like a good idea. JavaScript is installed everywhere (sometimes turned off, but the user could change that). If you need any help I would be glad to assist!

Greetings from Germany,
Florian

Spring Pierre schrieb:
hi all,

before getting into any detail, let me try to describe the FCKW workflow as it is now.

1 catching the edit event:
==========================
the TPL_METAHEADER_OUTPUT and TPL_ACT_RENDER are caught.

when processing the TPL_METAHEADER_OUTPUT event, the plugin injects the necessary JS libraries into the $event->data['script']

the TPL_ACT_RENDER on the other hand is caught and stopped. the loaded wiki text is rendered by the plugin's renderer... this generates an XHTM that works with the fck editor...

2 saving:
=========
the DOKUWIKI_STARTED is caught.

the xhtml returned from the client by the fck editor is transformed using the CPAN perl library and saved.

3 misc:
=======
there is some more work done, e.g:
 * get the drafs system working
* adding a delete button, because this no xhtml still is rendered to some whitespaces (easy to fix though)

a hell of a lot of work went into modifying the fck editor, in order to reflect the DW functionality... including the native file manager... footnotes... links... ect...

i should also say that i learned a lot about the DW internals while developing this plugin. there are some things i'd do in a very different way if i'd start from scratch again.

I don't know about the comlexities of FCKW - but I've been thinking for a while if its possible to rewrite FCKW to use DokuWiki syntax instead of (X)HTML, and let it be rendered by the DW-Engine snippet by snippet via AJAX ...

this comment gave me an idea... most of the work could be done on the client side... just hook into the TPL_METAHEADER_OUTPUT and dynamically add a "edit in WYSIWYG" button... then, when clicked, get the rendered xhtml via ajax... load the fck editor... and work.

on save (or save draft), the xhtml can be transfomed on client side using xslt.js [1] !!! i love that idea most ;)

what do you think about this? most of the hard work is done (the fck editor for DW)... i think this rewrite would not be too difficult, but way cleaner.

greetings from thailand
pierre
==
[1] http://johannburkard.de/software/xsltjs/
--
Liip AG // Rte de la Fonderie 7 // CH-1700 Fribourg
Fon 026 4222511 // Key id 0x5BF5F8FA // www.liip.ch





--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: