• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Custom Visual Markup using the HtmlEditorKit

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,
I'm trying to create a 'simple' html/xml editor, where I can highlight a word/s then click a button which applies a markup tag to the selection.
Also depending on the markup tag the editor pane would show a visual change (but not the makup tag) i.e.
<thesky>sky</thesky>
shows only the word sky in blue.
I've tryed using a JTextPane() along with the HtmlEditorKit(), as the editor kit only supports HTML 3.2 it would required me to append my markup tags to the SGML DTD (rather complicated).
If this indeed does work, it still leaves me pondering how to show a visual change, without affecting the markup.
------------------
Linda Janes
-x-
[This message has been edited by Linda Janes (edited November 22, 2001).]
[This message has been edited by Linda Janes (edited November 22, 2001).]
 
What's that smell? Hey, sniff this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic