I have a Bot app that returns a newline just fine to the Skype preview windows 10 app, using \n\n. However, when I display the message in the web app https://web.skype.com/en/?ecsoverride=developer, it does nor respect the newline breaks and represents it as an ongoing string.
I do not see in the help here: https://docs.botframework.com/en-us/csharp/builder/sdkreference/activities.html
...how to represent a newline regardless of what the client will be - is there some newline that can be used for any client that will receive the message from my bot? If I add something like
it shows as that text in my skype windows 10 app instead of a newline - I'm looking for some newline that works on any client.
Any ideas?
Update for 3.5 version
putting to string \n\n
creates a new paragraph. Like the following:
"Paragraph1_text/n/nParagraph2_text"
results in
Paragraph1_text
Paragraph2_text
Older versions
I found out that putting two spaces + NewLine symbol solves the problem(C# code):
return $"some text: {Environment.NewLine}text from new paragraph"
Or
return $"some text: \ntext from new paragraph"
The result is
some text:
text from new paragraph
This works for both: Microsoft Bot Framework emulator and Skype chat
Inserting HTML line break <br/>
works!
I use two new lines with a "zero width non-joiner" unicode character.
=> \n\n\u200C
I successfully tested it in Facebook, Skype, Webchat, Emulator.
It also works , if you want blank lines!
A combination of \n\u200C<br>
works.
Adding \r\n
to the string being sent works well for many clients.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With