# Adding a new line constant to a text node

**URL:** <https://discourse.nodered.org/t/adding-a-new-line-constant-to-a-text-node/84326>\
**Category:** Dashboard\
**Created:** [6 January 2024 07:55 UTC](https://discourse.nodered.org/t/adding-a-new-line-constant-to-a-text-node/84326 "2024-01-06T07:55:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [6 January 2024 07:55 UTC](https://discourse.nodered.org/t/adding-a-new-line-constant-to-a-text-node/84326/1 "2024-01-06T07:55:46Z")

</div>

Hello  
I have the following function passing text to a dashboard text node.

msg.payload = "line 1";

If I wanted to change the payload to msg.payload = "line 1 line 2"

How do I put line 2 on a new line? I have tried "line 1 \n line 2" but it does not work.

---

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [6 January 2024 08:00 UTC](https://discourse.nodered.org/t/adding-a-new-line-constant-to-a-text-node/84326/2 "2024-01-06T08:00:26Z")

</div>

using html break did the trick!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 January 2024 08:01 UTC](https://discourse.nodered.org/t/adding-a-new-line-constant-to-a-text-node/84326/3 "2024-01-20T08:01:23Z")

</div>

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