Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The tippy package is not working when using html_paged output #308

Open
Mosk915 opened this issue Mar 3, 2023 · 2 comments
Open

The tippy package is not working when using html_paged output #308

Mosk915 opened this issue Mar 3, 2023 · 2 comments
Labels
external concerns external libraries

Comments

@Mosk915
Copy link

Mosk915 commented Mar 3, 2023

I am trying to use the tippy package in the html_paged output, but it's not working. It works fine when using the regular html_document output though. I can see that the tippy javascript library is in the <head> but for some reason it's not working.

This is the Rmd file that doesn't work. Nothing happens when you hover over the button.

---
title: "tippy"
output: 
  pagedown::html_paged:
    toc: false
    self_contained: true
---

<button id="test" type="button">Test</button>

```{r, echo=FALSE}
library(tippy)

tippy_this("test", "Text...")
```

And this is the one that does work. When you hover over the button you see the tooltip. The only difference is the output type in the yaml header.

---
title: "tippy"
output: 
  html_document
---

<button id="test" type="button">Test</button>

```{r, echo=FALSE}
library(tippy)

tippy_this("test", "Text...")
```
@cderv
Copy link
Collaborator

cderv commented Mar 3, 2023

pagedown is a R package to help create paginated HTML, often with the aim to be print ready version created from HTML and CSS. This is heavily built on pagedjs library

Paged.js is a free and open-source library that paginates any HTML content to produce beautiful print-ready PDF

it implements CSS Paged Media and other W3C CSS modules.

I am putting back the context here because this is highly possible that a JS library made for interactive website like tippy.js or popper.js is not compatible with CSS paged media or at least with pagedjs library.

So I wouldn't expect this to work.

First think would be to know if pagedjs works with such other library, but I would think they are not. I don't think tippyjs will support CSS Paged Media.

So this is a upstream issue / feature request - we won't do much in pagedown for this. This needs to be asked on Stackoverflow regarding those JS lib interaction or in each respective repository or chat forum (like https://mattermost.coko.foundation/ for paged.js)

@cderv cderv added the external concerns external libraries label Mar 3, 2023
@Mosk915
Copy link
Author

Mosk915 commented Mar 3, 2023

I understand. Thank you for providing the explanation and context surrounding the JS libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external concerns external libraries
Projects
None yet
Development

No branches or pull requests

2 participants