Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! ✅Check out the new docs.

HTML tags in Annotations

Is there a list of what HTML tags are supported in annotations or is there a way to open up support for all HTML tags? I have the need to be able to insert other markup tags (p, strong, etc.). Currently seems like only basic tags like br, b, i, and span are supported but would be good to not have a limitation.

Thanks

Marcus

1 Like

I am also in favor of adding other markup tags, such as image tags within the annotation.

I was able to edit the plotly.js file and add the definitions for the missing tags I needed. For the un-minified library you can do a search for the “TAG_STYLES” variable and add the definitions. I just had to do a string search to find the right portion of the minified library to make the additions to it. The only downside of this is it will require you to host the library internally instead of using the CDN but for us we are happy as that adds an extra layer of version control as we control the updates.

Marcus

That’s great! You should consider adding that as a new feature and submitting it as a PR to plotly