Geertjan's Blog

  • October 23, 2006

Experimenting with a Visual HTML Editor

Geertjan Wielenga
Product Manager
Jarda contributed a new sample to contrib, called manifesteditor. If you're looking to find out about MultiView editors, I highly recommend it. (I discovered I needed a trunk build, together with JDK 1.6, but haven't yet worked out why, and maybe it isn't true.) It's a pretty good sample that will form the basis of a chapter in the upcoming module development book. It has a normal text editor for Manifest files, with a "Visual mode" that consists of a property sheet. It isn't hard to adapt it to your own purposes. I put lots of JOptionPane.showMessageDialog lines in a variety of methods, to see what gets called when. At the end of it all, I created the start of a very simple WYSIWYG editor for HTML files. This is the visual part:

And when you click "Text", you see the textual side of the story:

I'd like to use Jarda's sample as the basis of a tutorial too, so that the many people waiting for information in this subject don't have to wait all the way to half way next year, which is when the book is set to be released... But, if you can't wait, check out contrib/manifesteditor, and just play with the code like I did.

Join the discussion

Comments ( 3 )
  • Sven Reimers Monday, October 23, 2006
    You may need trunk build since the current trunk projects only open with trunk - it seems this is a known issue - M4 shall be out these days - stick with this - daily will be experimental the next time. Why JDK 1.6 I do not know - anybody??
    P.S. Don't you ever sleep?
  • Geertjan Tuesday, October 24, 2006
    Thanks for the info Sven and sorry for not responding sooner. I was... sleeping. :-)
  • Anton Epple Saturday, October 28, 2006
    Nice, have you got a good HTML renderer? I'm searching for one since years.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.