Product: PowerShell Universal Version: 3.8.8
it’s me again.
I have a multi line textinput in a Form in a Dashboard. When I submit the form I get the text from the text input. So far so good. Now I’d like to replace all New Lines with
because I will use that text to send out an E-Mail. If I don’t do this, the line breaks the user has placed via ENTER on his keyboard won’t get passed through to the E-Mail, because E-Mail is HTML and this textbox uses something else.
New-UDTextbox -Id 'txtMessage' -Label 'Message' -Placeholder 'Your message including >Hello...< and >Kind regards...<' -Multiline -Rows 4 -RowsMax 10 -FullWidth
$text = $EventData.txtMessage $text = $text.replace([System.Environment]::NewLine, "<br>") $text = $text.replace('`n', "<br>")