Hi All,
I am having a paragraph field where the field will be populated with the data, which comes as a template content. Now user can edit some of the Content in the screen and click on send Email,
Now the Body of the email would be updated data in paragraph field.
Eg: data which comes In Paragraph field
ABC
After editing
THis is sample
Thanks and regards,
Harsha
Now when I show it in body it is changing to
ABC This is the sample thanks and regards, Harsha
It is coming on a single line rather than in the lines specified in the Paragraph field
Is there any where to retain the same format as is....
Please suggest
Harsha :)
Discussion posts and replies are publicly visible
You probably want to make an expression rule which you can pass any text through when using in an email, as email text has its own special quirks as well as HTML formatting.
I've used the following expression rule for a long time now and it's worked well. It replaces regular line breaks (char(10)) with "<br/>" tags, replaces secondary line breaks (char(13)) with null, and replaces "&", "<" and ">" with their HTML equivalents, to reduce the risk that they cause issues when entered by a user.
reduce( fn!substitute, trim(ri!input), merge( { "&", ">", "<", char(10), char(13) }, { tohtml("&"), tohtml(">"), tohtml("<"), <br/>, "" } ))
Namely, you'd need to use a special specific line break code that Word knows how to read. The other characters can remain the same. Here's my "word text sanitizer" rule:
reduce( fn!substitute, trim(ri!input), merge( { "&", ">", "<", char(10), char(13) }, { tohtml("&"), tohtml(">"), tohtml("<"), "</w:t><w:br/><w:t>", "" } ) )