WYSIWYG text editor in Java

I would like to compile all the WYSIWYG text editors for Java here.

Some rules for entries:

  • There should be a link to the project / product
  • You must indicate whether it is open source or commercial
  • Is it possible to expand the editor (add new features such as "purple centered sudoku")? Is it easy or hard?
  • Does it have many functions (styles of styles and paragraph styles with online spelling in several languages ​​in one document) or just the basics (bold, italics, without underlining)?
  • List important dependencies (does it work in bare Java with Swing? SWT? MacOS?)
  • Your personal opinion

This list should help developers determine which editor to choose. I am not looking for the “best”, but more “what's there.”

+46
java editor wysiwyg
May 12 '09 at
source share
11 answers

Jwebengine

I recommend JWebEngine . This is the only one that I know that passes the ACID1 browser test and the mail acid test. Most other Java HTML editors are based on javax.swing.text.html.HTMLDocument and have all the same errors. CSS support is very poor with HTMLDocument. JWebEngine has very good support for viewing HTML with CSS.

  • Link to the website . There are also online samples.
  • Commercial license
  • It is very simple to expand. The provider uses it for many different things, such as an editor, an HTML printing engine, displays custom placeholders, etc. There are no problems with the visibility of classes such as Sun HTMDocument.
  • It is based on javax.swing.text.JEditorPane or javax.swing.text.JTextPane, and you can use it along with third-party tools like JOrtho spell checking.
  • It is pure Java and works on all platforms with Java SE 5 or higher. It also runs in unsigned applets.
+7
Dec 16 '09 at 21:31
source share

RSyntaxTextArea

I used this component and it works well. This is an LGPL, and it is based on the javax.swing.text package (javax.swing.text.EditorKit). Since this is a Swing component, it can be integrated into your application in several lines of code:

RSyntaxTextArea textArea = new RSyntaxTextArea(); textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); RTextScrollPane sp = new RTextScrollPane(textArea); 
+6
May 15, '09 at 13:21
source share

Openoffice writer

It can be embedded in Java using OOoBean . The source code works under Swing, but you can make it work under SWT as well, using AWT / SWT Bridge ( sample code ).

The project is open source ( LGPL ). The code is OS-specific, but versions are available for all major OSs (Windows, Linux, MacOS and Solaris are supported on the project site, but you can also download the source code and compile it for others).

Since the base product is a full-featured office application, it offers all the features you might need (fantastic styles, online spell-checking in different languages, embedding images, text flow around images, you name it).

The disadvantage is that you must have OpenOffice installed; In fact, the editor is not part of Java, but it is a remote process that simply appears in your Java application window. This means that the startup time is quite noticeable and the performance can be sluggish. Also processing is sometimes "odd". Some configuration is required to get rid of extra borders and unwanted pagination.

Because of this, the editor is not really expandable with Java. You will have to either write code in C ++, or using your own built-in OOo language. What you can do is that you can register listeners in a document, and you have full access to the basic model of the document. This way you can catch on to important parts and change behavior, but this is often the same as doing keyhole operations.

My conclusion: if OO has the necessary functions, this may be the easiest way to get what you need. If you need a lot of customization, you will fight the upward battle against the default frames.

+4
May 12 '09 at
source share

Just HTML

  • its GPLed
  • have no idea how easy it is to expand it.
  • does not support spell checking, but has tables, lists.
  • Based on Swing, Java 1.4 is required, and possibly Java Help
  • I did not use it as a programmer - just like for the end user, it has some quirks - like not a multi-level list or tables that are small, but everything is in order.
  • Plus it gives you HTML, so it's easy to embed processing results in other components.
  • Now sourceforge
+3
May 14 '09 at 19:47
source share

I needed the same thing for our application, did a study and found two more products, EKit and Metaphase Editor , based on Charles Bell HTMLDocumentEditor , both under the LGPL license and in good condition.

But I did not test them. These days we will see what we choose.

+3
Jan 18 '11 at 17:56
source share

docx4all

docx4all is a cross-platform WYSIWYG editor for docx files using Java Swing and JavaFX Script. Works like an applet or app. See http://dev.plutext.org/trac/docx4all/wiki/FeatureSet

open source or commercial? See http://dev.plutext.org/forums/viewtopic.php?f=7&t=209

Requires Java 6.

+1
Oct 18 '09 at 10:25
source share
  • Here is the link: JRichTextEditor
  • This is open source (LGPL).
  • You can do whatever you want. Just clone it from github. It is extensible.
  • It comes with some features, but improvements are welcome. This is a swing component, dependent on iText 2.1.7 (which is still LGPL) and other libraries (e.g. xerces). One of the notable features is the ability to add labels / ranges of any class. What can be used for hyperlinks or whatever. The library also has a help application.
+1
Apr 28 '13 at 17:13
source share

Using the WYSIWYG HTML editor and SWT browser components ( see snippets for examples ). Options:

Pro:

  • Many options due to HTML
  • It supports HTML as its own format (therefore, there are no unusual problems when you need to save documents or modify them somewhere, unlike, say, the native Word format).
  • Working with fonts, colors, images is simple, since you do not need to manage resources yourself. The browser component will do this for you.

Contra:

  • The decision is platform dependent. Tests with richhtml4eclipse showed different behavior in Windows XP (IE) and Mac OSX (Safari)
  • If there is a problem, users will have to switch to viewing the HTML code and fix it themselves.
  • Good luck with maintaining content, completing code, spelling, collapsing, or annotating.
  • Adding special features will force you to do keyhole operation through a fairly simple API
  • With many of these editors, performance is not that great, especially with large documents.
  • Depends on SWT.

Source: Lösungen für einen SWT Rich Text Editor

0
Sep 16 '09 at 13:38
source share

Rich text viewer

Pro:

  • It offers spell checking, code completion, undo / redo, automatic indentation, and most of the other features you expect ( see here )

Contra:

  • Depends on SWT
  • Table support
0
Sep 16 '09 at 13:48
source share

Take a look at JWord

  • This is a commercial
  • Many functions (tables, swap, H / F, column layout, wmf, svg, copy-paste, RTF, ODT, HTML export)
  • gratuitous
  • pure java swing (1.6)
  • extensible (based on the Swing Text API)
0
May 18 '10 at 12:48
source share

Eclipse Project Resurrected Vex (Visual Editor for XML)

On the wiki page:

  • Vex uses many of the mature plugins that make up the Eclipse Java IDE, such as CVS , document search and tool bookmarking and search engine .
  • The Eclipse platform implements a sophisticated plug-in architecture, allowing Vex to expand with third-party or custom plug-ins.
  • Vex is available with its own look for many platforms , including Windows, Linux / GTK and Macintosh OS-X / Carbon.
  • Java developers using the Eclipse IDE can install Vex in their IDE as a plug-in, making it easier to maintain software documentation or other XML files using Vex.
  • Vex can be reused: the Vex editor widget is available as pure Java, a cross-platform component with SWT links. Developers can reuse this widget , for example, as an RCP application.

Version 1.0 was released in 2012, and 1.1 is scheduled for 2013.

User's manual

0
Apr 26 '13 at 7:57
source share



All Articles