0

html style not working

I'm trying to use the "html()" function inside a formula to try and style some text fields.  Here's an example of what I've tried:

html("<h1 style=""""color:blue;font-size:86px;"""">" + 'Base Name' + "</h1>")

But no matter how I change the "style" parameters, I always get the same thing.  Is it possible to override the style of html text like this?

4 replies

null
    • Post Hoc Limited
    • Peter_Amies
    • 4 yrs ago
    • Reported - view

    ARGH!  Was escaping the double-quote marks incorrectly.  Should be "" instead of """".  Was mixing up my languages.

    My bad  :-(

    • Sean
    • 4 yrs ago
    • Reported - view

    You have too many quotes. Try this...

     

    html("<h1 style=""color: blue; font-size: 86px;"">" + 'Base Name' + "</h1>")

     

    It looks like you'll need to adjust margins or padding though.

    • Sean
    • 4 yrs ago
    • Reported - view

    Looks like I should have waited a couple of minutes ;-)

    • Post Hoc Limited
    • Peter_Amies
    • 4 yrs ago
    • Reported - view

    Ha ha!  Thanks Sean.

Content aside

  • 4 yrs agoLast active
  • 4Replies
  • 1555Views