Conversational UI: Line break in text

7 posts, 0 answers
  1. Zohair
    Zohair avatar
    4 posts
    Member since:
    Feb 2019

    Posted 21 Feb 2019 Link to this post

    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

  2. Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 22 Feb 2019 Link to this post

    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
  3. Zohair
    Zohair avatar
    4 posts
    Member since:
    Feb 2019

    Posted 22 Feb 2019 in reply to Stefan Link to this post

    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

  4. Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 25 Feb 2019 Link to this post

    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
  5. Zohair
    Zohair avatar
    4 posts
    Member since:
    Feb 2019

    Posted 25 Feb 2019 in reply to Stefan Link to this post

    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

  6. Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 25 Feb 2019 Link to this post

    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
  7. Zohair
    Zohair avatar
    4 posts
    Member since:
    Feb 2019

    Posted 25 Feb 2019 in reply to Stefan Link to this post

    Hi,

    Yes. Great and thanks alot.

    Best,

    Zohair

Back to Top