scribble {xaringanExtra} | R Documentation |
Scribble
Description
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).
Usage
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)
Arguments
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 |
Value
An htmltools::tagList()
with the scribble dependencies, or an
htmltools::htmlDependency()
.
Functions
-
use_scribble()
: Adds scribble to your xaringan slides. -
html_dependency_fabricjs()
: Returns anhtmltools::htmlDependency()
with thefabric.js
dependencies for use in xaringan and R Markdown documents. Most users will want to useuse_scribble()
instead. -
html_dependency_scribble()
: Returns anhtmltools::htmlDependency()
with the scribble dependencies for use in xaringan and R Markdown documents. Most users will want to useuse_scribble()
instead.
Usage
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() ```
Examples
use_scribble()