In Java using the JTextPane and a HTMLDocument how do I make HTML bullet points which works similar to the way Microsoft Word does it? I have looked all over Stack Overflow to try to answer my question, but every answer which is similar is very buggy or does not create a new bullet point when pressing enter.
I have tried using
Action insertBulletAction = new HTMLEditorKit.InsertHTMLTextAction ("Bullets",
"<ul><li> </li></ul>", HTML.Tag.P, HTML.Tag.UL);
But it only creates a bullet point and does not continue to create more when pressing enter. How can I make it create more when creating a new line?
I know this is possible because it is done with SHEF and other wysiwyg/html editors.
Aucun commentaire:
Enregistrer un commentaire