react-chat-widget icon indicating copy to clipboard operation
react-chat-widget copied to clipboard

Line breaks and other markdown support

Open byrne-greg opened this issue 6 years ago • 5 comments

Hi,

More of a question. I've been trialing use of this widget and I can get limited markdown to work (e.g. lists). However I'm not able to trigger line breaks or horizontal rules using markdown.

Is this something that is configurable or have I missed a beat here?

Thanks

byrne-greg avatar May 24 '18 08:05 byrne-greg

Hi @byrne-greg ! Thanks for the heads up, that was a problem with the package we were using to render markdown and it was limited for those cases. We already changed it and it will be in the next version :smile:

mcallegari10 avatar Jul 13 '18 13:07 mcallegari10

Hi @mcallegari10, do you have an example of this? How can I use this markdown when I call addResponseMessage()

Tks

natamvo avatar Aug 31 '18 18:08 natamvo

In case someone else wants to print line breaks in the response message: the only one that seems to work is \n (double space \n). <br/> is escaped and \n is ignored.

gdaniel avatar Jul 27 '19 21:07 gdaniel

any update on this ?

AzaanKhan271 avatar Jun 17 '21 07:06 AzaanKhan271

I just found that I can use 2 \n to print line breaks , i.e., \n\n

jackchaufy avatar Aug 11 '21 09:08 jackchaufy