Feature Proposal: Use FckEditor as the default WYSIWYG editor
Motivation
The current editor is too complex. It converts too much between twiki and html mode. It has bugs for
I18N support. When editing pages with html or twiki code, most of the time, I have go for the raw edit button.
I need an editor that has only one mode that works for everything.
Description and Documentation
My idea is to preserve the html as html and twiki code as twiki code. And allow them to coexist in the same editor.
So if you like to use fckeditor to generate an unordered list, you can click on the tool bar. It will generate <li></li>. But if you like twiki style 3spaces*, you can input it. The editor will not try to be smart and convert 3spaces* into <li></li> or vise-verse But
both way will look the same in the rendered wiki page!
In this editor, if I input 3spaces*
* This is a list.
It will not work.
But in my editor, you can choose your style. And as a side effect, the editor will be simpler and have less bugs.
In my implemetation, it will convert <h\d> heading into ---+ style. Because this affects %<nop>TOC% generation. And I will also convert <pre lang="cpp></pre> into %CODE% and %ENDCODE%. Because the
SourceHightlightPlugin will need it. Some other things be the same. But I will not convert too much!
I tried to use fckeditor, with succ currently. I suggest you guys consider the same. It generate neat html code, without any variation! I think maybe it parses the html into a syntax tree and regenerated it.
Examples
Here is fckeditor demo page. It supports popup menu and multi-languages.
http://www.fckeditor.net/demo
The following pictures are snapshots of my integration. Things to note:
- The 3space* style and html style list looks the same. But in the editor, they are different.
- %CODE%!%ENDCODE% is converted to <pre lang="cpp"></pre>. If I put the caret in the code, fckeditor will show style as "Source Code".
- %SEARCH{""}% is converted to
<pre lang="twiki">%SEARCH{""}</pre>
- 3spaces* is converted to
"   *"
Impact
Implementation
--
Contributors: FengZhaolin - 17 Mar 2009
Discussion
Thank you for the suggestion. How about implementing this as a plugin?
--
PeterThoeny - 18 Mar 2009
Yes, may be I can. But currently, I changed Save.pm, so that I can save and preview the page.
I plan to rewrite it in javascript, so the preview and conversion can be done solely in the client side.
--
FengZhaolin - 18 Mar 2009