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 ⁠"#FF0000⁠ (red)). Must be a hexadecimal color, e.g. ⁠#000⁠ or ⁠#4232ea⁠.

pen_size

Pen size (default is 3).

eraser_size

Eraser size (default is pen_size * 10).

palette

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.

minimized

Use the minimized fabric.js dependency?

Value

An htmltools::tagList() with the scribble dependencies, or an htmltools::htmlDependency().

Functions

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()


[Package xaringanExtra version 0.8.0 Index]