CKeditor as Wikka Editor


NEWS


  • -> 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 : easywikka.wickedfondation.fr


a WYSIWYG editor for WikkaWiki, running with Wiki Text !

Install

codes are here :

edit.php hack
fckinput.php
fckoutput.php


The new 3.0 WYSIWYG Html editor by Frederico Caldeira Knabbe is about to be released : http://ckeditor.com/


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 ! :)




--MaiGre

CategoryUserContributions

Comments [Hide comments]
Comment by DarTar
2009-05-19 12:41:23
MaiGre, this looks very interesting, in particular:

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

thanks for sharing the code. Do you have a public demo?
Comment by MaiGre
2009-05-19 12:55:17
i'll update a demo tomorrow :)
Comment by MaiGre
2009-05-20 04:05:48
-> http://easywikka.wickedfondation.fr/
the SandBox is in public editing mode
for the moment it doesn't work very well
but i hope it will be stable in one or two weeks..
Comment by AndreasHeintze
2009-09-03 15:38:38
Thanks for starting this! I have planned to give wikka a wysiwyg editor someday, but I haven't had the time yet, so I have to check this out. Maybe I can help you out with some of the problems.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki
Page was generated in 0.0301 seconds