Dear Gerry and Bezoar,
In the current Github code I implemented your suggestion so that you can render directly HTML or Markdown strings.
The method is: `pathName render text ?ext?`
if html tags are present it will be rendered as HTML. If there are no tags at the beginning per default Markdown is assumed. The format can be enforced as well by providing the default file extension.
Have a look at the manual page. I am only in doubt currently how to handle links if there are no files ... I think there should be a user defined function to handle links to non-existing files. I'm open here for suggestions.
https://htmlpreview.github.io/?https://github.com/mittelmark/shtmlview/blob/master/shtmlview/shtmlview.html#section4
The current Git source code can be downloaded here:
https://downgit.github.io/#/home?url=https://github.com/mittelmark/shtmlview/tree/main/shtmlview
Please note that the script was reorganized together with akupries to allow inclusion into tklib. shtmlview is as well there in the current fossil trunk (slighly behind my github code).
Furthermore a plugin structure was added to allow rendering of other file formats which can be translated into HTML. As an example Tcl's doctools format was already added. So you can render now Tcl doctools manual pages like this: `tclsh shtmlview.tcl shtmlview.man`
Detlef