#' Define common formatting for flextables
#'
#' @param ft flextable object
#' @param textsize fontsize of text body
#' @param headsize fontsize of header
#' @export
theme_flextable <- function(ft, textsize = 9, headsize = 10){
tmp <- flextable::bold(ft, bold = TRUE, part = "header")
tmp <- fontsize(tmp, size = textsize, part = "body")
tmp <- padding(tmp, padding = 0.2, part = "all")
tmp <- line_spacing(tmp, space = 1, part = "all")
out <- fontsize(tmp, size = headsize, part = "header")
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.