Restricting HTML tags entered in a JEditorPane

Discussion in 'Java' started by Rex King, Apr 20, 2005.

  1. Rex  King

    Rex King Guest

    I have to create a HTML pane using a JEditorpane that lets the user
    type in HTML formatted text and then preview it.
    However-the user is only allowed to enter a few tags-bold, underline,
    italics, and ordered and unordered lists.
    The conventional way to do it would be to parse the entered string and
    filter out the other tags.
    Is there a better way to do it, using the editorkit classes, or the
    HTMLDocument class, or something like that?
     
    Rex King, Apr 20, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TN Bella
    Replies:
    1
    Views:
    1,558
    TN Bella
    Jul 1, 2004
  2. Mark H. Wood
    Replies:
    2
    Views:
    5,522
    Andrew Thompson
    Jul 12, 2004
  3. Robin
    Replies:
    0
    Views:
    741
    Robin
    May 12, 2005
  4. Replies:
    1
    Views:
    673
    Henry S. Thompson
    Dec 21, 2005
  5. Henry
    Replies:
    1
    Views:
    107
    M. Burnett
    Apr 21, 2006
Loading...

Share This Page