add newline markdown in a load event/variable
I have a string variable that is being added to in a ForEach loop. After the loop finishes, I have a load event in a form to show that variable to the end user .
I'm using markdown to make certain values bold etc. in the loop (this is working perfectly)
=$strDisplay.result+
'**'+$forEach1.item.layerName+'** '+
'\n'+
+$forEach1.item.attributes.DISPLAYVALUE
I need to also add linebreak/new line markdown but nothing is working. I've tried \ <br> <br/>   \n no luck. Can it be done?
-
For normal text, you need to insert two newlines to have markdown generate a new paragraph, e.g.
="**Bold 1**\n\n**Bold 2**"This is not needed for headers, which will have a newline appended by default:
="# Heading 1\nLine"If you are not sure about the exact syntax, just drop a Text element on a form and type some markdown in its Description field. This will show the same behavior.
0 -
You can also get a "soft" line break by adding two spaces before a "\n":
="**Bold 1** \n**Bold 2**"Result:
Bold 1
Bold 2
0 -
Perfect! Thank you both
0
Please sign in to leave a comment.
Comments
3 comments