Revision [20651]

This is an old revision of CKeditor4Wikka made by MaiGre on 2009-05-20 11:01:14.

 

CKeditor as Wikka Editor


NEWS


  • -> 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


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.
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 :
  • normal list is not perfectly working
  • numbered list are not supported yet
  • thread-class list neither
  • stuffs using actions like Tables, Colored Text,.. but i'm working on (and i'm waiting fo Wikka 1.7 table's !)
  • stuffs using the CSS like floats
  • make CKeditor use the wikka stylesheet for a better editing view
  • 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 "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 ! :)

Install
  • 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 (post a comment) :)
i will post it when it will be more stable




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