Botframework-sdk: Can't create newline in Hero Card text [MS Teams]?

Created on 24 Jul 2017  路  1Comment  路  Source: microsoft/botframework-sdk

I want to have multiple lines in my Hero Card text and I followed this post by doing the following in my code

        var card = new HeroCard {
            Title = buildName + " " + buildType + " on " + buildDate,
            Subtitle = "Build Evaluation: " + buildEvalResult,
            Text = "Hello \n\n World \n\r Hello! \r\r New Line?",
            Images = new List<CardImage> ()
            {
                new CardImage(url: await getHeroCardPic("HAPPY"))
            },
            Buttons = new List<CardAction> ()
            {
                // card Actions...
             }
        };

When I try this out in MS Teams I see a card with no line breaks in the text. Am I doing this wrong, or does MS Teams not support this yet? Thanks for the help.

err line

Most helpful comment

I got this working using <br> like so: \n\n , \n, and \n\r don't seem to work for ms teams

Text = "Hello \nWorld \nHello! \r\r New Line? <br> Word Here \n Not working"

>All comments

I got this working using <br> like so: \n\n , \n, and \n\r don't seem to work for ms teams

Text = "Hello \nWorld \nHello! \r\r New Line? <br> Word Here \n Not working"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jschristophe picture jschristophe  路  3Comments

verdysh picture verdysh  路  3Comments

Vigneshramkumar picture Vigneshramkumar  路  3Comments

clearab picture clearab  路  3Comments

daveta picture daveta  路  3Comments