This is a migrated thread and some comments may be shown as answers.

Conversational UI: Line break in text

6 Answers 293 Views
Wrappers for React
This is a migrated thread and some comments may be shown as answers.
Zohair
Top achievements
Rank 1
Zohair asked on 21 Feb 2019, 02:06 PM

Hello,

I am getting familiar with Conversational UI to use it with Dialogflow.

Is it possible to have line breaks in the text, if the text consists of 2 or 3 parts. 

I am taking this as the sample project: https://www.telerik.com/kendo-react-ui/components/conversationalui/integrations/dialogflow/

Thanks

6 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 22 Feb 2019, 07:37 AM
Hello, Zohair,

The Conversational UI will automatically display longer text into multiple lines.

If the desired result is to manually separate it like with the user hits Shift + Enter, I can suggest making a feature request for this. Currently, the Conversational UI is using an input element which allows only typing on a single line:

https://feedback.telerik.com/kendo-react-ui

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Zohair
Top achievements
Rank 1
answered on 22 Feb 2019, 08:20 AM

Hello Stefan,

Thanks. I was asking about the answer that we get from the Chatbot, not the text that is typed by the user.

For example, If the chatbot wants to display 3 different addresses in 3 different lines. Is there some way it can be done ? 

Best Regards,

Zohair

0
Stefan
Telerik team
answered on 25 Feb 2019, 10:49 AM
Hello,  Zohair,

Thank you for the clarification.

Currently, this can be done by separating this is three different messages:

https://stackblitz.com/edit/react-yskkz8?file=app/main.js

If this is not an option please let us know.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Zohair
Top achievements
Rank 1
answered on 25 Feb 2019, 11:47 AM

Hello Stephan,

Thanks. Luckily, I knew that already. So for this to happen the bot must send 3 separate messages. 

I thought may be there was some other neat method for this. 

Regards,

Zohair

0
Stefan
Telerik team
answered on 25 Feb 2019, 12:40 PM
Hello, Zohair,

After more research I was able to achieve it with templates and the markdown parser:

https://www.telerik.com/kendo-react-ui/components/conversationalui/message-templates/#toc-displaying-markdown-content

This is an example:

https://stackblitz.com/edit/react-5wjsg5?file=app/main.js

I hope this approach will be more suitable.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Zohair
Top achievements
Rank 1
answered on 25 Feb 2019, 01:38 PM

Hi,

Yes. Great and thanks alot.

Best,

Zohair

Tags
Wrappers for React
Asked by
Zohair
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Zohair
Top achievements
Rank 1
Share this question
or