create new tag
, view all tags

Feature Proposal: Use FckEditor as the default WYSIWYG editor


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.


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:

  1. The 3space* style and html style list looks the same. But in the editor, they are different.
  2. %CODE%!%ENDCODE% is converted to <pre lang="cpp"></pre>. If I put the caret in the code, fckeditor will show style as "Source Code".
  3. %SEARCH{""}% is converted to
    <pre lang="twiki">%SEARCH{&quot;&quot;}</pre> 
  4. 3spaces* is converted to
    "&nbsp;&nbsp *" 

sample page 1



-- Contributors: FengZhaolin - 17 Mar 2009


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

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng 1.png r2 r1 manage 93.5 K 2009-03-17 - 14:34 FengZhaolin  
PNGpng 2.png r1 manage 107.6 K 2009-03-17 - 13:56 FengZhaolin  
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2009-03-18 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.