How do I make XML tags in JTextPane not editable, text is editable?



My application creates a JTextPane, and StyledDocument in which I place XML. For example:


The MC5 kicked off the whole ​​<mrk id='m2' type='term'>​​proto-punk​​</mrk>​​ scene in Detroit.


I would like the text to be editable, but the tags to be locked, or not able to be edited. In the above sample, everything except <mrk id='m2' type='term'> and </mrk> would be editable.


Thanks!


No comments:

Post a Comment