flashCard
flashCard copied to clipboard
TO-DO
The package handles too much for the user. The addition of the method to support list somewhat helps but one is still limited by intepretations that are made on the JavaScript-side (such as below). These appear as very nice touches at first but I think they make the JavaScript code more complicated and likely to break and also, as people pick up and start to like the package they will want to do more and this might appear as a limitation: what if I want no title or an h1 tag.
htagBack = document.createElement("H2");
htagBack.innerHTML = jsonData.back[0];
I think flashCard would be more flexible and also more robust with:
# pseudo code
front <- tagList(h1("Front"), img(src="path/to/img.png"))
back <- tagList(h1("Back"), code("install.packages('flashCard')"))
flashCard(front, back)
You can then just convert to tags to character strings and use innerHTML.
as.character(front)