This new tool converts the current buffer’s text to an unsaved HTML page including TSE’s syntax highlighting.
This can be used to generate syntax highlighted code snippets for use in your own web page.
For example, I am in the process of making the code snippets in this web page syntax highlighted:
https://ecarlo.nl/tse/files/TSE_Pro_v4.4_Undocumented_Features.html
This can also be used to copy syntax highlighted code snippets into an email, provided that your email client supports the necessary HTML.
Outlook does support this, iOS mail mostly supports this.
As far as I currently know, even if the receiver’s email client does not support it, it will still show the code snippet, just not syntax highlighted.
I have created an example syntax highlighted code snippet at the bottom of this email.
I would love to hear from you whether your email client does or does not support showing it syntax highlighted.
Text2html download page:
https://ecarlo.nl/tse/index.html#Text2html
Syntax highlighted code snippet:
// Calculate the square of a number
proc Main()
string reply [5] = ''
integer number = 0
integer square = 0
while Ask('Calculate the square of which number?', reply)
number = Val(reply)
square = number * number
Warn('The square of'; number; 'is'; square)
endwhile
PurgeMacro(SplitPath(CurrMacroFilename(), _NAME_))
end Main
Outlook showed the above snippet just like I sent it.
iOS mail showed the snippet syntax highlighted, but not with default white letters on a black backround, but the reverse.
Let me know the name of your email client and how shows the snippet, and I will add that to the documentation.
Carlo
Fixed: The Text2html tool now also works if TSE's cursor line is configured to be colored differently than other text lines.
https://ecarlo.nl/tse/index.html#Text2html