scribble | R Documentation |
Scribble lets you draw on your xaringan slides. Click the pencil icon to begin drawing. Use the eraser to remove lines from your drawing, or the trash to clear the entire canvas. Note that in order to minimize confusion, you will not be able to navigate slides while in draw or erase mode.
You may toggle the visibility of the scribble toolbox by pressing S
at
any time. Your drawings will persist when changing slides. You may save a
permanent copy of the slides with the markup by printing your presentation
(e.g. using Chrome > File > Print).
use_scribble(
pen_color = "#FF0000",
pen_size = 3,
eraser_size = pen_size * 10,
palette = NULL
)
html_dependency_fabricjs(minimized = TRUE)
html_dependency_scribble(pen_color, pen_size, eraser_size, palette = NULL)
pen_color |
Initial pen color (default is |
pen_size |
Pen size (default is 3). |
eraser_size |
Eraser size (default is |
palette |
A selection of up to 10 colors that become available when
drawing is active via the keys |
minimized |
Use the minimized |
An htmltools::tagList()
with the scribble dependencies, or an
htmltools::htmlDependency()
.
use_scribble()
: Adds scribble to your xaringan slides.
html_dependency_fabricjs()
: Returns an htmltools::htmlDependency()
with the
fabric.js
dependencies for use in xaringan and R Markdown documents.
Most users will want to use use_scribble()
instead.
html_dependency_scribble()
: Returns an htmltools::htmlDependency()
with the
scribble dependencies for use in xaringan and R Markdown documents. Most
users will want to use use_scribble()
instead.
To add scribble to your xaringan
presentation,
add the following code chunk to your slides' R Markdown file.
```{r xaringan-scribble, echo=FALSE} xaringanExtra::use_scribble() ```
use_scribble()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.