Skip to main content
Nintex Community Menu Bar
Solved

Literal Dialog adds BR Tag


NigelStratton
Forum|alt.badge.img+5

I am displaying HTML saved by the rich text editor in a literal dialog message, but it’s adding <br> tags which aren’t in the original HTML.

Has anyone else noticed this? Is there a way to prevent it?

Best answer by TinTex

It looks like this may be a documented considerations:

  • If you save data from the Design tab to a SmartObject or database and the data is not saved correctly such as with line breaks, you must switch to the HTML tab before saving the data to get the correct results.

https://help.nintex.com/en-US/k2five/userguide/current/Content/Create/K2Designer/Controls/RichText/RichTextControl.htm

View original
Translate
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+10
  • Nintex Employee
  • 176 replies
  • Answer
  • April 24, 2023

It looks like this may be a documented considerations:

  • If you save data from the Design tab to a SmartObject or database and the data is not saved correctly such as with line breaks, you must switch to the HTML tab before saving the data to get the correct results.

https://help.nintex.com/en-US/k2five/userguide/current/Content/Create/K2Designer/Controls/RichText/RichTextControl.htm

Translate

NigelStratton
Forum|alt.badge.img+5

Thanks for that. Of interest, the HTML saved, does not include <br> tags, which is good but I still get <br> tags added to the dialog box.

This is hacky but it works. I added a transfer data to a literal, as an “and” rule with Show a message. Basically clears the br tags 50 milliseconds after loading.

<script>setTimeout(()=>{let element = document.querySelectorAll(".message br"); for (index = element.length - 1; index >= 0; index--) {element[index].parentNode.removeChild(element[index])}},50)</script>

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings