bbontrager
05-16-2024Data Storage
Handling Multi-line text in blox
Noticed an odd behavior with multi-line text inputs in blox.
If I define a text input as multiline...
{
"type": "Input.Text",
"id": "data.Parameters.NOTES",
"defaultValue": "",
"isMultiline": true,
"rows": "5",
"value": "{panel:NOTES}"
},
I can enter text with new lines as expected
We save this to a database by an API, then retrieve it. If we just display the data, newlines are preserved (bottom of the picture below) BUT the same panel value in the text input is rendered with the <br/> tag embedded in it (top of the picture below)
{
"type": "TextBlock",
"id": "",
"class": "",
"spacing": "small",
"weight": "normal",
"widget": "90%",
"text": "{panel:NOTES}"
},
Embedding the <BR/> tag makes sense when the value is being shown as a Text Block, but not when it is placed into a Text Input.
Is there a blox setting that will allow the Text Input to render as expected, or do I need to hack around it with javascript in the widget?