How to highlight with HTML in a table card?

TannerGarrett
TannerGarrett Domo Product Manager

Hello,

 

We used to be able to highlight keywords in a paragraph of text in a table card. We insert a <span> tag with a background color to highlight the keyword we've chosen (this is all done in the dataflow before it hits the card). The <span> tags have worked great up until recently, now it seems the system doesn't recognize the tags and so the tags come through as plain text. I've attached an example screenshot of what the table looks like now.

 

Any ideas on how to get this functionality back?

 

 

Comments

  • The custom html strings should be working still, however if the string is incorrectly formatted in any way it will break and not display as expected.

     

    Also, it will only display the proper html in a table card chart view, and not the alternative table view. Referencing the attached image, only the left hand "chart" view will display the html.

     

    The html won't display properly outside of the table card chart, so when viewing the data from the dataset view for example, or exporting to an Excel sheet.

  • TannerGarrett
    TannerGarrett Domo Product Manager

    Thanks for your help. I've ensured that the card is on the Chart view and not the Table view and I've checked that the html is correct. Could you explain a bit more what you mean by "if the string is incorrectly formatted in any way..." that seems to be the only thing that could be wrong.

  • Well HTML syntax is very particular, so if it's wrong in the slightest way, say:

     

    "<span style="#fff">Sample Text</span>"

    vs.

    "<span style="#fff">Sample Text<span>"

     

    Bottom one is missing the ending backslash, the HTML is considered invalid and won't render as expected.

     

    I can't see the bottom of the snippet you provided but I would check the rest of the text for any possible syntax issues.

     

  • TannerGarrett
    TannerGarrett Domo Product Manager

    Everything seems to be in place, end tags and everything... I've tested a few variations of syntax in another table card and can't seem to get it to work. Could it have anything to do with the "background-color" class we are using? (see attached screenshot)

  • So I just tried the string you provided in your last post and it's working correctly on my end (see attached).

     

    Would you try doing the same string in a beast mode, and letting me know if it works? Curious if there's an issue by performing it in the dataflow vs a beast mode.

  • TannerGarrett
    TannerGarrett Domo Product Manager

    I tried the Beastmode and it didn't work (see screenshots). Updates are handled completely by Domo right? Why would my instance be different than yours?

  • ZMM
    ZMM Member

    I believe you are missing the D in background-color.

  • dthierjung
    dthierjung Contributor

    Aside from opting into the beta program, our instances shouldn't be different in terms of base functionality like this.

     

    The comment above me by ZMM should be able to fix your beast mode formula though.

  • TannerGarrett
    TannerGarrett Domo Product Manager

    Yikes, rookie mistake. Thanks, that did fix the beastmode issue. The problem is that the html is added in the dataflow. The table card isn't recognizing any html, even <br> tags. Any other ideas?

  • dthierjung
    dthierjung Contributor

    That's very strange. I just tested adding html to a dataflow and it displays correctly in a table card.

     

    I think at this point we've exhausted what we could try to fix, and you will likely need to reach out to technical support for their help. It's possible that some instance settings may have been jumbled because everything is working properly on my end.

     

    Sorry we couldn't help find a solution!

This discussion has been closed.