Results 1 to 5 of 5

Thread: HTML Editor

  1. #1
    sole is offline Member
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Default HTML Editor

    Hi!

    For an application that I am working on, I need to take formatted user input (user types in a text box) and save it in a file, and display if later. I plan to save it in html format.

    This is how I am going around with it - using Java swings -
    1. Use a JTextPane and a JScrollPane to show the editor on screen
    2. Allow the user to manage the Bold / Underline / font size, etc using a key map.
    3. On Save click, I use the getStyledDocument() to retrieve the styled document.

    But beyond this, I am lost! How do I convert the StyledDocument to an html file and back?

    Do we have an html parser / writer build in? Or do I need to look for some open source code for this? If so, please suggest a good one

    Thanks!

  2. #2
    AndreB's Avatar
    AndreB is offline Senior Member
    Join Date
    Dec 2009
    Location
    Stuttgart, Germany
    Posts
    114
    Rep Power
    0

    Default

    can this help ?
    "There is no foolproof thing; fools are too smart."
    "Why can't you solve my Problem ?"

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    There is a free HTML editor called EKIT for Java. Search on the web, you may find a documentation related to that.

  4. #4
    sole is offline Member
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Default

    Thanks for your help!

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. Help for a Text Editor.
    By necroninja in forum Advanced Java
    Replies: 0
    Last Post: 08-01-2009, 05:21 PM
  2. How can I include a html file in html textarea?
    By surya_dks in forum New To Java
    Replies: 2
    Last Post: 10-04-2008, 07:20 AM
  3. Editor for Java
    By peiceonly in forum New To Java
    Replies: 4
    Last Post: 08-13-2008, 08:27 AM
  4. HTML editor
    By blueboy in forum AWT / Swing
    Replies: 0
    Last Post: 01-15-2008, 12:52 PM
  5. Xml Editor
    By Marty in forum XML
    Replies: 3
    Last Post: 05-11-2007, 09:27 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •