Text wrapping in send cards

Hi team,

I am using app.sendCards() function to display cards on web bot. but the text on the button is not getting wrapped.

Do we have any property to wrap text in app.sendCards?


// Static Width (Plain Regex)
const wrap = (s) => s.replace(
    /(?![^\n]{1,32}$)([^\n]{1,32})\s/g, '$1\n'

// Dynamic Width (Build Regex)
const wrap = (s, w) => s.replace(
    new RegExp(`(?![^\\n]{1,${w}}$)([^\\n]{1,${w}})\\s`, 'g'), '$1\n'

Can you explain what exactly you’re facing by sharing a Screenshot…

1 Like

Hey @Chidhigi_Shravani,

Please add the necessary screenshots to help us understand this issue.

I dont think there will be any possible fix to this issue. please try new line of restrict text size to <=20.

1 Like