# Plugins.dialogs  Strips Line Ends

**URL:** <https://forum.servoy.com/t/plugins-dialogs-strips-line-ends/21315>\
**Category:** Questions\
**Created:** [October 17, 2024, 10:14pm UTC](https://forum.servoy.com/t/plugins-dialogs-strips-line-ends/21315 "2024-10-17T22:14:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkilshaw1553613063](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@tkilshaw1553613063](https://forum.servoy.com/u/tkilshaw1553613063)\
**Post date:** [October 17, 2024, 10:14pm UTC](https://forum.servoy.com/t/plugins-dialogs-strips-line-ends/21315/1 "2024-10-17T22:14:17Z")

</div>

When I pass a string with multiple line end characters in it, that is “\n” characters, when the text is displayed all the lines are shown without line breaks.

Is there any way to get for example plugins.dialogs.showInfoDialog( ‘Information’, multiLineString ) to display the text without stripping out the line end characters?

thanks,

Terry

---

<div class="post-metadata">

**Author:** ![robert.edelmann](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/robert.edelmann/32/4494_2.png) [@robert.edelmann](https://forum.servoy.com/u/robert.edelmann)\
**Post date:** [October 18, 2024, 12:07am UTC](https://forum.servoy.com/t/plugins-dialogs-strips-line-ends/21315/2 "2024-10-18T00:07:42Z")

</div>

In NG / TiNG you can use  
and other tags to format your Dialog.

```auto
function dialogTest() {
	plugins.dialogs.showInfoDialog('titel','message
spanning
several
lines.');
	// alternative
	var message = 'message with\nbreaks.';
	plugins.dialogs.showInfoDialog('titel',utils.stringReplace(message,'\n','
\n'));
}

```

---

<div class="post-metadata">

**Author:** ![tkilshaw1553613063](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@tkilshaw1553613063](https://forum.servoy.com/u/tkilshaw1553613063)\
**Post date:** [October 18, 2024, 3:19pm UTC](https://forum.servoy.com/t/plugins-dialogs-strips-line-ends/21315/3 "2024-10-18T15:19:12Z")

</div>

Thanks Robert!

This has saved me a great deal of work. A couple of questions still remain:

- why are the \n characters being kept. Why not "  
" rather than "  
\n"?

- can any other HTML elements be used here too?

again my thanks and gratitude!

Terry

---

<div class="post-metadata">

**Author:** ![robert.edelmann](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/robert.edelmann/32/4494_2.png) [@robert.edelmann](https://forum.servoy.com/u/robert.edelmann)\
**Post date:** [October 18, 2024, 4:30pm UTC](https://forum.servoy.com/t/plugins-dialogs-strips-line-ends/21315/4 "2024-10-18T16:30:57Z")

</div>

I keep the newline around due to force of habit and backwards compatibility, I think it worked in smarclient and ng the same way then. We moved away from smartclient, so I can’t really test anymore.

You can use other elements, some of them look off in certain clients ( **looks off on my mac at least, _is fine), we use and for our use case._**

---

<div class="post-metadata">

**Author:** ![tkilshaw1553613063](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@tkilshaw1553613063](https://forum.servoy.com/u/tkilshaw1553613063)\
**Post date:** [October 18, 2024, 4:37pm UTC](https://forum.servoy.com/t/plugins-dialogs-strips-line-ends/21315/5 "2024-10-18T16:37:47Z")

</div>

My thanks again.

all the best,

Terry
