ADF Faces 11g – Rich Text Editor: editing WYSIWYG HTML text in JSF Web Applications

For one of my current ADF projects, the customer has asked for a Rich Text Editor – to allow the end user to easily edit Email-messages that are sent from the system. Currently that is done in plain text using a simple HTML Textarea – but their application is going through a major overhaul, trying to exploit many benefits of Web 2.0, AJAX and modern CSS based layout. We originally intended to embed the MyFaces Tomahawk Rich Text Editor component in the application, but then I very fortunately – among the rather long list of component – ran into the JDeveloper 11g Technology Preview 2 and encountered its Rich Text Editor component:

ADF Faces 11g - Rich Text Editor: editing WYSIWYG HTML text in JSF Web Applications 

Since the application is scheduled to go live only deep into 2008, we will switch from the current JDeveloper 10.1.3.3 stack to 11g somewhere early next year and we can make use of the new 11g features. This Rich Text Editor can be dragged to the page in the same way as any other component, like for example a simple inputText component. The value of a Rich Text Editor component is a " well formed XHTML-fragment".

When the page is run with the Rich Text Editor, it looks like this:

ADF Faces 11g - Rich Text Editor: editing WYSIWYG HTML text in JSF Web Applications

The supported editor features are:

Font Name

  • Font Size
  • Link/Unlink
  • Clear Styling
  • Undo/Redo
  • Bold
  • Italics
  • Underline
  • Subscript/Superscript
  • Justify (Left, Middle, Right, Full)
  • Ordered Lists/Unordered Lists
  • Indentation
  • Text color
  • Background color

It does not support embedding images!

The rich text editor value can for example be used to programmatically compose an Email and sent it onwards. Or to (XSLT) transform the rich text into XSL_FO and PDF or RTF formats. Or to just store the text in the database.

4 Comments

  1. rahul August 25, 2011
  2. Ashwin Almeida February 23, 2011
  3. Peter Crouch September 4, 2008
  4. vamsi August 28, 2008