Java – Rich text editor for JSF 2

java, jsf, jsf-2, rich-text-editor, richtext

I searched around for a basic WYSIWYG rich text editor that I can use in a JSF 2 (VDL) application, but found nothing satisfactory.. in the sense that:

  • The editor is very extensive, and not configurable (like PrimeFaces)
  • The editor doesn't work with VDL (like RichFaces)
  • Multiple instances of the editor cannot be used on the same page (like Tomahawk t:htmlArea)

I actually don't need all the fancy things like Fonts, Indenting/justification, undo/redo… just Bold, Italic, Lists and Hyperlinks would suffice.

Do you know of something that works well in this scenario, as well as gives out XHTML compliant markup, and works well with partial page refreshes(f:ajax), or would you recommend that I write my own?

Thank you!

Pradyumna

Best Solution

Just use TinyMCE. As far as JSF is concerned, the input can just be treated like a textarea. It gets rendered on the client, and gets a postback of text with the form submission; what you do with it in while in the browser doesn't matter to JSF.