scribble: Scribble

scribbleR 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

  • 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.

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


xaringanExtra documentation built on July 16, 2022, 5:06 p.m.