RSS RSS feed | Atom Atom feed

A simple html editor for java

I am a big Java fan, but sometimes I can get a bit frustrated.

I need a simple html editor for my application. Should something like this be in swing ?

Yesterday I tried to use the HtmlEditorKit. It works for most things, but to let it work in the real world, you need a lot of extra code.

Drag and drop from Ms Word doesn't work out of the box.

It took me some time to figure out that you need to add this:

HTMLDocument doc = (HTMLDocument)textPane.getDocument();
doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
doc.setPreservesUnknownTags(false);

Next, you need to define all the needed actions like :
align, lists, font selection, paragraph type, image and links...

I will need another full day to add these. ( and I lost already a lot of time yesterday ).

Tags :



Add a comment Send a TrackBack