JohnCoene / tippy

💬 Tippy.js for Shiny
http://tippy.john-coene.com/
Other
76 stars 2 forks source link

Text Overflow For Markdown Output #31

Closed jwojcikDEC closed 1 year ago

jwojcikDEC commented 1 year ago

Spoke too soon. I recently closed #30 but have run into an issue with text overflowing as noted in #11.

There was a solution for shiny scenarios in #13, but I am looking to fix this within an RMarkdown HTML output. Again, I was hoping to use the stable release if possible.

Thanks

jwojcikDEC commented 1 year ago

My apologize for blowing up the issues. Using the solution from #11, you just need to alter the CSS.

Instead of setting absolute pixel sizes:

htmltools::tags$style( ".tp{ height:200px; width:200px; text-align: center; }" )

You can use the word-break option:

htmltools::tags$style( ".tp{ word-break: break-word; text-align: center; }" )

I have a suite of different length text outputs to render in the same place depending on a condition, and this solution reacts to the differing sizes and wraps the table around the text accordingly.