How to make a certain element/text bold in rasa webchat

Hi @nik202 , I’ve created a custom action and I need only the result of dispatcher.utter_message to be visible in bold in my webchat.

So, in the above screenshot, I just want ‘customer’ to appear bold in my webchat. My frontend is -

The problem here is that if I add any css class at the top in this frontend code then it’ll affect every response text sent by the bot and thereby make every response bold. Also, I tried to use ANSI encoding like this -

But, it doesn’t make thing appear bold at the frontend, it only makes bold when i print in python but not in my browser.

Any help would be grateful. Thanks!

@webdev-rohit That’s it? It’s so easy peasy :upside_down_face ** any text to bold ** :

Updated code:

dispatcher.utter_message(text=f"For Customer: **{customer)**, attachment=carousel)]

Concept will be same everywhere i.e you can mentioned in domain.yml or actions.py or etc.

@webdev-rohit I like your enthusiasm, that you really working hard to solve this issue whilst applying all necessary code in the dispatcher, you are on the great learning. Best of luck for your work.

I hope this will solve your issue :slight_smile:

Thank you @nik202 as always. And yes, I am enthusiastic about Rasa and chatbots in general, so I try to put my utmost efforts! :grinning:

@webdev-rohit be like this always Rohit, you doing great and my best wishes and support with you always :slight_smile:

1 Like

5 posts were split to a new topic: How to make a certain element/text bold in Slack

How about if the element in the custom action is an intent within a loop? @webdev-rohit See my full question here How to format text from custom actions to appear bold in Slack?