218
Views
3
Comments
How to make text bold/italic/undelined by clicking on icons
Question
Service Studio Version
11.53.13 (Build 61176)

When user enter some information in a input text field, and then he should able to click on icons like B, I, U  and so on to make his text to bold/italic/undelined etc . 

How can I get that, can anyone help me?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Madhuri,

Bold, italic and underline are all CSS properties, so you could apply a conditional style class to the input (or text widget) when clicking the buttons.

UserImage.jpg
Madhuri Mylavarapu

I have tried but not getting the result,

I am trying to make the text bold.

I have taken an onclick action for B icon to enable/disable icon, and applied style classes. Like below

if(isSelectedBold, "font-weight:bold", "form-control")

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Madhuri,

Here's an example module that shows what I mean.

TestFormatting.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.