WYSIWYG text editor in Java

Aaron Digulla picture Aaron Digulla · May 12, 2009 · Viewed 50.4k times · Source

I'd like to collect all WYSIWYG text editors for Java here.

Some rules for entries:

  • There must be a link to the project/product
  • You must state whether it's open source or commercial
  • Is it possible to extend the editor (add new features like a "violet centered sudoku")? Is that simple or complex?
  • Does it come with lots of features (fancy character and paragraph styles with online spell checking for several languages in the same document) or just the basics (bold, italics, no underline)?
  • List important dependencies (does it run on bare Java with Swing? SWT? MacOS?)
  • Your personal opinion

This list should help developers determine which editor to choose. I'm not looking for "the best" but more "what's there".

Answer

adrian.tarau picture adrian.tarau · May 15, 2009

RSyntaxTextArea

I've used this component and it works well. It is LGPL and it is based on javax.swing.text package (javax.swing.text.EditorKit). Since it is a Swing component it can be integrated in your application in a few lines of code :

RSyntaxTextArea textArea = new RSyntaxTextArea();
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
RTextScrollPane sp = new RTextScrollPane(textArea);