views:

959

answers:

7

We have the need for a web-based wiki-like rich editor able to preserve original markup. At the moment a given custom markup is being converted to html for display and edit (allowing people to edit html in case of links and similar) then converted back to the specific markup when saving. This is obviously error prone and not ideal.

A first big decision is between a pure javascript html based solution (like TinyMCE) and a more client oriented solution with things like flash or silverlight that would allow us not to worry about html and so forth.

What are the best options at the moment in your experience?

+2  A: 

Over at Mozilla they've been working on this:

Mozilla Bespin

zaczap
interesting - thanks for the link
JohnIdol
This is the future.
Pascal Thivent
+4  A: 

This is a long discussion. My advise is to use a javascript with good XHTML output. Don't use flash or silverlight at all.

For my project I've used the YUI text Editor and everythink worked really good. Try it here : http://developer.yahoo.com/yui/examples/editor/skinning_editor.html

Try this link, it's a really good web editor comparision, to get what you need:

alexl
Thanks for your answer and the links - I'd be interested in knowing why you exclude flash and silverlight.
JohnIdol
First of all i dun know any good flash or silverlight good editor, in term of XHTML processing.Why is better to use xhtml, because you do web pages and it's always better to deal with xhtml directly that an interpretd pseudo language that will ouput the good formatting text.
alexl
+2  A: 

You may not need to allow direct HTML editing, if you use something like Textile -- users will always work with the wiki-like representation of the content, while on-demand one-way wiki-to-html conversion will be possible for proper display in HTML pages.

Here is an example for Ruby: http://redcloth.org/

In my opinion, plain-text editing (textile or wiki-like) this is the best, most lightweight and standards-compliant method for creating rich content out there (besides directly writing HTML, of course).

wireman
+1  A: 

We use Screwturn to develop interenal knowledge based wiki pages for our developers to reference. I would say its a decent free wiki tool.

kevchadders
+3  A: 

The kind of users and the environment in which the data is used has a lot to say. HTML is a presentational format, so using it to edit content in, is suboptimal. In many cases, you need to separate content from presentation, and then HTML will cause you trouble because of this. You can of course try to restrict the input to a subset of HTML, but this is hard to get right and it kind of cripples the idea in the first place, because the input is then no longer really wysiwyg. CMS have struggled with this problem for years, so I guess there's no easy solution to it.

If you editors are power users (probably programmers, but I've had success with mere mortals), you can have them input content in markdown or a similar content-centric format and then transform it to HTML on presentation. The biggest hurdle for this approach seems to be the lack of realtime preview (wysiwyg). I've used Showdown to render a preview in realtime, like this site does - and I've recently made a widget for a sort of hybrid wysiwyg type of input, that you may find usable.

troelskn
+1  A: 

I would suggest using a Javascript based editor. There are a number of them out there and they are really good. I find flash / java / active x / etc. based editors slow and clumsy compared to the JS editors.

Some of the JS editors that I am fond of are:

scurial
JohnIdol
I think that you are able to do drop-n-drag with TinyMCE. If not it has event handers for the drop and drag events:tinymce.dom.Event.add(ed.getDoc(), 'drop', function(e) { ....});
scurial
I just tried the TinyMCE Demo and it supports drop and drag:http://tinymce.moxiecode.com/examples/full.phpAt the bottom of the page there is a small rubix cube graphics. You can drop-n-drag that into the editor.
scurial
+1  A: 

I personally love TinyMCE.

When useing TinyMCE I can rekommend looking into BB code. The text i rendered in BB-code realtime in the editor so it looks like bold or what style you want.

Save it to the database en BB-code format and then have a string replacer when displaying the text.

If you want standard wiki-markup you can probably make your own plugin that renders wiki-code so to speak.

Emil C