I don't think it'd be too difficult. You could set up some simple CSS rules to cover different formats within the script. You should give it a shot and see what you come up with.
A lot of this will be largely dependent how the text is formatted. Text documents are very simplistic, so they lack a lot of the formatting specifics of more advanced formats.
|