### Load libraries ###
library(shiny)
library(shinyAce)
library(shinyFiles)
library(shinyBS)
library(knitr)
library(rmarkdown)
### ###
### Set options ###
editR:::.loadOptions()
### ###
### Load app bits ###
bits <- paste0("bits/",
c("header", "about", "keyboard", "hidden",
"navbar", "editor", "preview"), ".R")
sapply(bits, source)
### ###
### Prepare file ###
if (is.null(md_path)) {
setwd(tempdir())
} else {
setwd(md_path)
if (!file.exists(md_name)) {
template_path <- paste0(find.package("editR"), "/app/template.Rmd")
template <- readChar(template_path, file.info(template_path)$size)
cat(template, file = md_name)
}
md_bak <- NULL
}
### ###
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.