Skip to Content
0
Sep 18, 2017 at 04:38 PM

how to apply two css classses to FORMATEEDTEXTVIEW component ?

664 Views Last edit Sep 18, 2017 at 07:56 PM 4 rev

Can i apply two CSS classes to one FORMTTEDTEXTVIEW component ?

I need to achieve two different colors for a single single sentence and show it on a FORMATTEDTEXTVIEW .

I have tried the following html text and i have defined two css classes in 'colorblue' and 'colorred' in css file

<p class="colorblue"> Some text <p>

<p class="colorred"> Another text :)</p>

var html =  '<p> Some text <p> <p> Another text :)</p>';
FORMATTEDTEXTVIEW_1.setHtmlText(html); 

I dont want to use two Components as text is dynamic and length isnt constant .

" This a string text which i need in two different colors and its dynamic "

Thanks,

Pramod