JTextPane Control Character Formatting / Custom Markup
Posted on 2009-05-06
I would please like to know what the best / easiest means of accomplishing the following would be:
A JTextPane that receives text that has custom characters for formatting text, for example @TEXT@
Would show the word "TEXT" in the JTextPane and be in bold.
I have looked into custom HTML tags, but they seem to follow HTML markup (for example, <B>TEXT</B> would accomplish the same result, but it has to be enclosed with the '<' and '>').
I unfortunately don't have code as I have no clue where to start and is just a simple JTextPane.
Any ideas? I am out of ideas here.