[dokuwiki] Re: Thoughts On FCKW
- From: Spring Pierre <pierre.spring@xxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Thu, 17 Apr 2008 09:55:11 +0200
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
- Follow-Ups:
- [dokuwiki] Re: Thoughts On FCKW
- From: Kay Roesler
- [dokuwiki] Re: Thoughts On FCKW
- From: Florian Feldhaus
- References:
- [dokuwiki] Thoughts On FCKW
- From: Spring Pierre
- [dokuwiki] Re: Thoughts On FCKW
- From: Christopher Smith
- [dokuwiki] Re: Thoughts On FCKW
- From: Gerry Weißbach
Other related posts:
- » [dokuwiki] Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- » [dokuwiki] Re: Thoughts On FCKW
- [dokuwiki] Re: Thoughts On FCKW
- From: Kay Roesler
- [dokuwiki] Re: Thoughts On FCKW
- From: Florian Feldhaus
- [dokuwiki] Thoughts On FCKW
- From: Spring Pierre
- [dokuwiki] Re: Thoughts On FCKW
- From: Christopher Smith
- [dokuwiki] Re: Thoughts On FCKW
- From: Gerry Weißbach