• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maintaining paragraph in HTMLEditorKit

 
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I use a JTextPane, HTMLEditorKit to let the user do bold, italic and so forth. sometimes when the user saves the document the <p></p> is missing?

Normally when you make a new document from the editor kit you get <html><body><p></p></body></html> but sometimes the <p></p> tag is missing. Is there any way to get this to work in 100%?

// MAthias
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure you are not replacing the logical style when modifying a paragraph style. Retaining the Logical Style When Setting a New Paragraph Style
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks but it doesn't work!

Here's my problem.

When I create a new document the <p> tag is missing. If a begin typing a <p> tag creates.
If I delete all the text by pressing backspace the <p> tag get removed when the last letter is gone?!

Please help
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic