View source: R/markdownResizer.R
| add.resizer | R Documentation | 
Set options for the inclusion of sizing toolbar in documents
add.resizer(
  theme.color = NULL,
  position = c("top", "bottom"),
  font.size = NULL,
  font.color = NULL,
  tables = TRUE,
  images = TRUE,
  line.color = NULL,
  thumb.width = NULL,
  thumb.height = NULL,
  line.width = NULL,
  line.height = NULL,
  dim.units = "px",
  default.image.width = NULL
)
| theme.color | theme color for resizer and table e.g. black or #000000 | 
| position | position of the resize toolbar e.g. top or bottom | 
| font.size | size of the page font in px e.g. 14px | 
| font.color | color of the page font in e.g. darkblue or #006699 | 
| tables | boolean. TRUE or FALSE, to add resize toobar to tables | 
| images | boolean. TRUE or FALSE, to add resize toobar to images | 
| line.color | color of the resizer track e.g. red or #f5f5f5 | 
| thumb.width | width of the resizer thumb e.g. 25 | 
| thumb.height | height of the resizer thumb e.g. 25 | 
| line.width | width of the resizer track e.g. 200 | 
| line.height | height of the resizer track e.g. 10 | 
| dim.units | unit for the height and width of the track or thumb | 
| default.image.width | default width of all images on the page e.g. 100 | 
Inclusion of mini toolbar for images and tables within a page
More examples and demo pages for this function are located at this link - https://r2resize.obi.obianom.com.
# default settings
r2resize::add.resizer()
# add resizer to only images
r2resize::add.resizer(
  tables = FALSE,
  images = TRUE
 )
# add resizer to only tables
r2resize::add.resizer(
  tables = TRUE,
  images = FALSE
 )
# add resizer to both images
r2resize::add.resizer(
  tables = TRUE,
  images = TRUE
 )
# set position of the resize toolbar
r2resize::add.resizer(
  position = "top" #this is the default, another is 'bottom'
 )
# set resizer line color, height and width
r2resize::add.resizer(
  line.color = "green",
  line.width = 150,
  line.height = 5
 )
#declare more arguments including default image size
r2resize::add.resizer(
  theme.color = "blue",
  position = "top",
  font.size = "12px",
  font.color = "brown",
  tables = TRUE,
  images = TRUE,
  line.color = "green",
  line.width = 150,
  line.height = 5,
  default.image.width = "40%"
) # customized settings
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.