0

My goal is to create a simple WYSIWYG html/css editor, I know how to view and edit html using the JEditorPane but this does not support CSS styles and that's where the problem lies.

Is their anyway to implement CSS into the JEditorPane, and if not are there any alternatives or better solutions?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Zatran
  • 51
  • 5
  • *"..but this does not support css styles"* Sure it does. It just implements them very sparingly. ;) – Andrew Thompson Nov 27 '13 at 06:22
  • you basically need to embed a browser engine (eg webkit) into Java GUI. A previous post talks about it http://stackoverflow.com/questions/2492540/webkit-browser-in-a-java-app – AurA Nov 27 '13 at 06:31
  • Thanks Guys :) I'll look into the webbkit implementation but Thank you for the response. I'll get right to work. – Zatran Nov 27 '13 at 06:36

1 Answers1

0

SwingBox provides a replacement of jEditorPane with better CSS Support. It is pure Java (it does not requre WebKit or other native rendering engine). Editing is not supported but since it uses the jEditorPane infrastructure, it is theoretically possible to implement it. FlyingSaucer seems to be another alternative for viewing.

radkovo
  • 868
  • 6
  • 10