CKeditor as Wikka Editor


  • -> the editor view now support css from the wiki !
  • -> div problem ok
  • -> indent problems solved (not entirely but it looks ok)
  • -> cool ! image action is working with resize support !
  • -> demo here :

a WYSIWYG editor for WikkaWiki, running with Wiki Text !


codes are here :

edit.php hack

The new 3.0 WYSIWYG Html editor by Frederico Caldeira Knabbe is about to be released :

This project - CKeditor (renamed from FCKeditor since 3.0) - is a complete editor with filemanager.
(Well, in the 3.0beta2, the filemanager is not available)
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).

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 couple days so my formatter is not optimized (i ask for your help...)
But it seems to work :)

As the final content is saved as wikitext, we can easily switch between WikiEdit and CKeditor.

You can use some Wikitext syntax in Html mode ! (actions, CamelWords, forced links)

Not all features are implemented, here is the TODO list :
There is also features from CKeditor not supported by Wikka (that can be hack by creating new actions!)
The "waiting_for-support" 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 19 may 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 ! :)



There are 4 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki