# Multiline labels revert to single line

**URL:** https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673
**Category:** General
**Tags:** possible-bug
**Created:** [24 February 2023 08:46 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673 "2023-02-24T08:46:08Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [24 February 2023 08:46 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/1 "2023-02-24T08:46:08Z")

</div>

I just noticed that nodes with multiline labels switch to single line once you've dragged them into the workspace

Little bug or just something hard to prevent?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14b675de75d73901bbb93b1edf310d67aac9c340.png)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [24 February 2023 08:48 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/2 "2023-02-24T08:48:33Z")

</div>

To keep the palette width reasonable we automatically wrap long labels if necessary.

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [24 February 2023 09:00 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/3 "2023-02-24T09:00:23Z")

</div>

Aah - OK.  
The reason I noticed this is because I wanted a node label to default to multiline and it doesn't.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/e/4eb0c72dfa640a606c53ed1b10e58af7480d7a81.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 February 2023 09:42 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/4 "2023-02-24T09:42:52Z")

</div>

try `"alternate \n switch"`

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [24 February 2023 10:15 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/5 "2023-02-24T10:15:09Z")

</div>

No sucess with that either

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/7/5705e3594a7d6b9d37957b9dacb513d4a810a430.png)

came out as  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae1a8281a796bffdc7584685721751c627cf1a21.png)  
changed the name to make sure wasn't getting a cache issue

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 February 2023 10:41 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/6 "2023-02-24T10:41:05Z")

</div>

sorry Simon, I meant remove the `this._` as well.

`return this.name || "test \n text"`

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [24 February 2023 10:49 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/7 "2023-02-24T10:49:19Z")

</div>

Still no coconut

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f16c8f9daff222965f36665265d1a20b29c72083.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/7/d7fd88cb23dc8fc366cd13196143ad5f64e78d9e.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 February 2023 10:51 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/8 "2023-02-24T10:51:28Z")

</div>

one last try `return this.name || "test \\n text"` 🤞

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [24 February 2023 11:04 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/9 "2023-02-24T11:04:11Z")

</div>

We have wormsign 🙂  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/1456af3c8b697ac3b2c2587d1c8b59fb8b7e6024.png)

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [24 February 2023 11:05 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/10 "2023-02-24T11:05:06Z")

</div>

I've got a supplemental but I'll leave asking it till later 🙂

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [24 February 2023 18:35 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/11 "2023-02-24T18:35:33Z")

</div>

My suplemental is (and only for interest - I can handle the variations)

Why do some nodes have a "-" in between words when in sidebar but not when placed onto a tab?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/8534d20c6ef32ea762762ae3d5c7cebff253e196.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 February 2023 19:38 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/12 "2023-02-24T19:38:51Z")

</div>

Palette label can be different (see doc for paletteLabel)

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [25 February 2023 07:03 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/13 "2023-02-25T07:03:37Z")

</div>

Ta, adding paletteLabel : "alternate switch" sorted it out for mine 🙂

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/3/337330282f2772612e3c341a9e1063e0cc4ac172.png)

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [25 February 2023 07:59 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/14 "2023-02-25T07:59:37Z")

</div>

so much of thinking goes into designing ! Kudos.

---

<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: [11 March 2023 07:59 UTC](https://discourse.nodered.org/t/multiline-labels-revert-to-single-line/75673/15 "2023-03-11T07:59:57Z")

</div>

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