Expression value add CSS
Question

Hi all,

How can I do this in expression value add bold class as below:

"hello <b>world</b>"  -> hello world


Thank you

Dick leung

mvp_badge
MVP

Hi Dick,

Are you creating a Traditional Web App or Reactive/Mobile?

Reactive, Thank you

mvp_badge
MVP

Hi Dick,

You could take a look at the Inject HTML Forge Component. I think this will allow you to do what you want.

Hello Dick,

I think the component that Kilian refer will work, I dont test it. With just some lines of Javascript you can do what you want.

I share an OML that do you want.

Hope it helps.

Best Regards,

Nuno R

TextBold.oml

mvp_badge
MVP

There's other forum posts about this topic, and one of them indeed suggests JavaScript, but it's a pain to insert that everywhere you want this - wrapping it in a Block or using a Forge Component is better practice.

I agree with you Kilian ;).

If I was doing something like Dick wants I will do it by wrapping a block with the lines of JS that I dont have one dependency for that.

Hope it helps my input.

Best Regards,

Nuno R

Hi Dick, 

In Reactive, you can use different way to make text as bold. 

You can use inline CSS, external CSS using class or you can add HTML Element like <b>

I share an OML file.

boldText.oml

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