How to formatting output in "Notification node"

Hi folks.

I'm using a "Button node" to execute a Linux system command then I pass the payload to a "Exec node" then to a "Notification node". The problem is that the output is on one line like this:

In "debug node" I see the output in the correct way

Is possible to have the output in the correct way also in "notification node"?

Thank you

try the pre html tag

Where can I put this code? In what node?
Thank you.

Did you read the link , the first thing it shows is the pre tag around the text. so try putting it either side of the text, in the notification node.

<pre>the text you wish to keep formating of</pre>

The notification node allow html and css as far as i am aware.
in a template node just before the notification node, <pre>{{payload}}</pre> were payload would be the property that holds the text.

Ok, but the text come from a command over Linux. My problem is to format that text...
And the example you posted, show how to do it in pure HTML/CSS not in Nodered.

Can you tell me what can I do or not please? It seems it's a secret or a mystery...

No secret you just need to read the info provided. The Core Nodes : Node-RED

This evening at home I will read all and try.
If I can't obtain my result can I ask you an example tomorrow?

Thank you so much...

I've not read this part of your message. I'm on work and also not in my office. Sorry...

I've trying to put "Template node" with "<pre>{{payload}}</pre>" code inside, between "stdout exit of Exec node" and "input of Notification node", but the result is that there is <pre> on the beginning of output and </pre> to the end.

Try checking
Accept raw HTML/JavaScript input in msg.payload to format popup
In the template node.

Flagging "Accept raw HTML/JavaScript input" in Notification Node has resolved. Now output is leggible.
Thank you very much for all

There is another little problem. I've noticed that the text between <pre> and </pre> is outputted in a "template node" as "normal text" and has no more CSS applied. Is possible to set CSS for a specific block?
Thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.