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)
An htmltools::tagList() with the scribble dependencies, or an
htmltools::htmlDependency().
Initial pen color (default is "#FF0000 (red)). Must be a
hexadecimal color, e.g. #000 or #4232ea.
Pen size (default is 3).
Eraser size (default is pen_size * 10).
A selection of up to 10 colors that become available when
drawing is active via the keys 0 through 9. Press the number keys of
0-9 to quickly active each of the palette colors.
Use the minimized fabric.js dependency?
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()
```