EDIT / UPDATE
I have found this program:
It seems to do what I want.
(Post left in case anyone else ever has this question)
When I am writing code here, it is automagically formatted and key words are one colour, and all that fancy stuff happens.
Copying it to some external editors, they also can handle the structure of the language.
I have (am) learning about
CSS and decided to print some stuff. Why?
My writing skill is not the best, and highlighting the syntax would be a bit of a low return.
So I thought I may use a word processor. I know it is way beyond the scope of this forum, but I'm stuck between asking here and joining the work processor forum only to be told that it is not in their area of expertise either.
I'm using Libreoffice. Does anyone know if I can do something with it so it highlights the code as it does in Node-Red.
Just with that working, I can paste code in and then write comments as well and it is all in one document.
Sorry it is so off topic.