Revision [20649]
This is an old revision of CKeditor4Wikka made by MaiGre on 2009-05-20 10:51:42.
CKeditor as Wikka Editor
NEWS
-> indent problems solved (not entirely but it looks ok)-> cool ! image action is working with resize support !
-> demo here : easywikka.wickedfondation.fr
The new 3.x WYSIWYG Html editor by Frederico Caldeira Knabbe is about to be released : http://ckeditor.com/
- there is no documentation for the moment ,
- and i need to configure a little bit more ckeditor, to get for example <div> and not <p>
- and also to configure the filemanager.
This project - CKeditor (renamed from FCKeditor since 3.0) - is a complete editor with filemanager.
It allows to edit page as a rich document, and ouput it as Html.
This is a mature project (waiting for the 3.0 release) and it works well.
FCK team has already start a mod of the editor (version 2.6) to have wikitext output for MediWiki,
so i decided to start a CKeditor4Wikka project.
The big difference with the FCK+MediaWiki project is that
i didn't want to change anything in the FCK core because this project change really often
so i would like to have a combo that we can easily update from both sides (Wikka and CK).
Example : CKeditor 3.0 will be radically different than FCKeditor 2.x :)
So CKeditor will run normally with HTML output, but i am working on a formatter
that translate common html output into Wikka-wikitext.
This is fckoutput.php and it is use when saving the page.
When starting edition, we need also Html to feed the editor with the current state of the page.
I did a modification of the usual wakka.php formatter, in order to desactivate some translations
as actions (the editor doesn't need included actions).
This is fckinput.php and it is use when entering the Edit mode.
I began to learn Regexp since yesterday so my formatter is not optimized (i ask for your help...)
But it seems to work :)
-> Demo ici : http:/easywikka.wickedfondation.fr/
As the final content is saved as wikitext, we can easily switch between WikiEdit and CKeditor.
You can of course use Wikitext syntax in Html mode !
Not all features are implemented, here is the TODO list :
- normal list is not perfect
- numbered list are not supported yet
- thread-class list neither
- stuffs using actions like Tables, Colored Text, Pictures.. but i'm working on (and i'm waiting fo Wikka 1.7 table's !)
- stuffs using the CSS like floats
- MindMap not tested (actually i don't realy know it..)
- Code
There is also features from CKeditor not supported by Wikka (that can be hack by creating new actions!)
- right align
- justify
- anchor
- flash
- font
- text-size
- background-color
The TODO list features are still available if you choose WikiEdit editor mode
but it will not have an effect in CKeditor. You will see it with wikitext syntax.
You can find here the edit.php hack to include CKeditor,
fckinput.php : the wakka light formatter (on editor start up)
fckoutput.php : the reverse html2wikitext formatter (before saving in database)
I started this yesterday (19 april 2009) so it's definitly just a start,
but i think i need advices to clean and optimize this code!
send corrections, remarks, feedbacks, tips, ideas ! :)
Those files are not up to date...
If you want see the current state : go to the demo page.
If you need the last version code just post a comment..
Install
- create a directory /handlers/page/ckeditor/ and unzip files from http://ckeditor.com/
- copy both fckinput.php and fckoutput.php into /formatters/
- hack /handlers/page/edit.php
I removed the code because it's changing all the time.
have a look there : easywikka.wickedfondation.fr
and if you want the code, just ask :)
i will post it when it will be more stable