I started this as a response to a comment on some post whose essence is practicing programming. I'll start with a few facts about Java.
Number 1: Swing components like JEditorPane can support different formatting styles
Based on this we can even start prototyping: