tippy icon indicating copy to clipboard operation
tippy copied to clipboard

markdown formatting inside a tooltip (quarto document)?

Open locusclassicus opened this issue 1 year ago • 2 comments

I have a simple .qmd file which knits to an html. It contains some tooltips added with tippy package. Is there a way to use markdown formatting inside a tip (for example, italics or bold)?

---
title: 'final'
format: html
fontsize: '18pt'
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(tippy)
```

Rumpitur <span style='color:blue;'> [invidia]{id='a'} </span> quidam, carissime Iuli...
 
```{r}
tippy::tippy_this(elementId = 'a', 
            tooltip = 'abl. causae', theme = 'light')
```

locusclassicus avatar Jun 21 '24 13:06 locusclassicus

I think you can pass HTML to the tooltip, e.g.: <strong>this is bold</strong>

JohnCoene avatar Jun 26 '24 23:06 JohnCoene

Ok, thanks!

locusclassicus avatar Jun 27 '24 20:06 locusclassicus