HeroCard: can not break line in HeroCard.text
How can i break line in text of HeroCard ? I try by "\n" or by "\n\n" , but nothing helps
Which channel are you using? Do you see the same behavior in the Emulator?
@astrung HeroCard text support markdown paragraphs. So try it with "\n" for a simple break line or "\n\n" to create a new paragraph.
Here you can see the documentation: https://docs.botframework.com/en-us/csharp/builder/sdkreference/activities.html
On bot facebook and emulator channel, it doesn't work
No one help me :( ? I am still waiting .
Example:
var card = new builder.HeroCard() .title("name") .subtitle("address") .text("Product:"+ myValue +"\n\n"+"Language:" + Array.join(", "))
Can you try string builder... StringBuilder str = new StringBuilder(); str.AppendLine("Welcome"); str.AppendLine(); str.AppendLine("to ");
and assign this to hero card....
How can i find StringBuilder in node js library ?
can you check this https://www.npmjs.com/package/stringbuilder
I thought your solution is in .Net
Best Regards, Ravi Pulluri. Sent from my Windows Phone
From: astrungmailto:[email protected] Sent: 10/26/2016 9:37 AM To: Microsoft/BotBuildermailto:[email protected] Cc: Ravi Pullurimailto:[email protected]; Commentmailto:[email protected] Subject: Re: [Microsoft/BotBuilder] HeroCard: can not break line in HeroCard.text (#1439)
How can i find StringBuilder in node js library ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/BotBuilder/issues/1439#issuecomment-256244486, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAY_W1TWZ6QK_h5HG_YnfzEp2Cw0ugGYks5q3tHlgaJpZM4KXuqT.
Bot framework channel is broken when send my card in nodejs with stringbuilder library:
var StringBuilder = require('stringbuilder');
var str = new StringBuilder();
str.appendLine("Welcome");
str.appendLine();
str.appendLine("to ");
var card = new builder.HeroCard()
.text(str)
You are mixing two systems.
Technically the herocard attachment replaces the text with a rich card. You should fill out the title, subtitle, etc fields the way that you want.
Closing due to age. We just released a much improved emulator and the markdown should work. If not, please let us know.
Hi, I am having the same problem. Markup works for the normal messages sent back to the user, but doesn't work for the text on a HeroCard. StringBuilder also doesn't work. This is using the emulator. Thanks, Pieter
@chrimc62 "\n" or "\n\n" does not work on webchat still.
Does the Cortana channel not support the markdown text format?
If you need advanced card formatting options, use Adaptive Cards instead of the Hero Card template.
We are fixing the breaks in WebChat and Adaptive Cards.
duplicate of #2583
@nwhitmont prod is now being pushed. Can you please verify if it is solved?
@reyesrico Ill take a look
I was able to confirm this is working in web chat with the following code:
HeroCard plCard = new HeroCard()
{
Title = $"I'm \r\r a hero \n\r card",
Subtitle = $" Wikipedia \r\r Page \n\r test",
Text = "line 1 \r\r line 2 \n\r line 3 \r line 4"
};
This snippet was rendered as this in emulator:
