views:

49

answers:

3

Hi,

Having tried many javascript RTEs, I always seem to run into one or more showstopper issues.

I was wondering if there were techniques other than the HTML designMode to build an RTE and work around these in a clean manner.. Maybe in Flash, or as a Java Applet or something?


PS: Things that are usually problematic in javascript RTEs:

  • There is no way to prevent users from pasting arbitrary rich text into the editor from other applications
  • No way to guarantee that the generated code is valid XHTML
  • Cannot have more than one editor on the same page
  • Cannot customize the controls associated with the RTE.
  • Cannot open the RTE in a jQuery/YUI dialog
+1  A: 

There are some JavaScript-based editors that don't use the design mode and thus have different benefits and drawbacks compared to the majority. Copying and pasting tends to be complicated with these also. Here's one example:

http://www.fluffy.co.uk/stediting/

With any choice you're likely going to have to customize it some. That one's under BSD license so it's just a question of whether you wish to spend the effort to do so. A Flash-based solution would also be good but not as cross-platform any more.

jjrv
A: 

We use FCKeditor (CKeditor is the new version. evidently they didn't like it sounding like profanity... http://ckeditor.com/). It fits all the requirements you listed above, except for the pasting from other applications. Word's mangled markup will still make its way though. We do some filtering on the server side to remove word markup.

Mike Ruhlin
A: 

I would recommend TinyMCE which does control how characters are pasted and what html/xml is generated.

Michael Shopsin
Thanks. I looked again at TinyMCE's docs after seeing your answer, and found that it does have some good support for Paste handling.. http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste
Pradyumna
We adopted TinyMCE because our editors paste text from Word and we need to convert the characters from Win-1252 to UTF-8.
Michael Shopsin