flashCard
flashCard copied to clipboard
Functionality with rmardown
Thanks for the great package. Will this work with static webpages created by rmarkdown? or has to be within a shiny app?
Hi, @bes827 it works for both static webpages created by rmarkdown and dynamic web by Shiny app. :)
Thanks for the reply. I tried the syntax below, however when I render to html, it only produces the first flash card (the expected output is three different flash cards). Any suggestions on what I should do different? thanks again @jienagu
---
title: "flashcard libray"
output: html_document
---
```{r}
library (flashCard)
df1 <- data.frame(
front = c("Title front1","contentfront"),
back =c("Title back1","content back")
)
flashCard(df1, elementId = "card", front_text_color = "yellow")
df2 <- data.frame(
front = c("Title front2","contentfront"),
back =c("Title back2","content back")
)
flashCard(df2, elementId = "card", front_text_color = "yellow")
In separate chunk:
df3 <- data.frame(
front = c("Title front3","contentfront"),
back =c("Title back3","content back")
)
flashCard(df3, elementId = "card", front_text_color = "yellow")
Hi @bes827 , this is because you are using same elementId
for all of your flash cards. Please use different elementId and you will see the problem solved.