OK. I get the rich text field content from a form that the users fill in. They can fill in answers that consists of multiple paragraphs. The PDF template maker doesnât add the whitespaces. I canât ask them to add <br.>, and I canât ask my client to go through everything by hand and add <br.>, any ideas on how I can a text with multiple paragraphs (or multiple lines) to print well and not be condensed on one line?
I need to check, but I think the issue is that using {{FieldName}} in a template will generate a markdown version of the content, which works well if youâre making a PDF based on markdown template, but not so well for a PDF that assumes an HTML template.
I think you may need to get the rich text field content as html, using a line of JS.
thanks! yes I use {{FieldName}} here and I tried to get the content of this Rich Text field to be able to use and manipulate in JS, but havenât pulled it of. Will keep on trying but if you or anyone finds a way I am curious.
Hi Chr1sG. I canât get the content of a Rich Text field to manipulate using JavaScript, when I try it is empty.
However, I used this formula to convert my Rich Text into a normal Text field with HTML:
Glad you found a solution, but Iâll note for anyone reading this: the âsnippetâ version of a rich text field is not always identical to the original rich text - some truncation/modification will take place.
It seems like this is not an issue for @bear though, so thatâs good
Thanks for your comment and your help Chris! That is useful to know that the snippet version is not always identical. I will thoroughly test this current solution for my client as I do not want any more surprises for him! But so far it looks good
I will experiment more and then get back to this topic if I find any other solutions or problems related to this. I hope more solutions!
You can run a script that copies the rich text to a standard text field as HTML, then use that text field in the HTML template instead of the rich text field.
Best would be to have this as an action in the same button as the one used for the pdf template, since updates are not instant when working with automations triggered on rich text field changes.
Thanks I will experiment with that approach and post the solution here. I can see the solution that you propose be more elegant and allow a lot more possibilities to some other puzzles