#'
#' @import shinyAce
#'
provenance_step_viewer.ui <- function(id)
aceEditor(outputId=NS(id, 'ace_editor'), placeholder='R script',
mode='r', theme='xcode',
tabSize=2, useSoftTabs=TRUE, wordWrap=TRUE,
showInvisibles=FALSE, highlightActiveLine=TRUE)
#'
#' @import shinyAce
#'
provenance_step_viewer.server <- function(input, output, session, picked_provenance) {
observeEvent(eventExpr=picked_provenance$script, label='provenance_step_viewer/script', handlerExpr={
updateAceEditor(session=session, editorId='ace_editor', value=picked_provenance$script)
})
}
#'
#' @import shinyAce
#'
ace_editor.ui <- function(id, ...)
aceEditor(outputId=NS(id, 'ace_editor'), placeholder='R script',
mode='r', tabSize=2, useSoftTabs=TRUE, wordWrap=TRUE,
showInvisibles=FALSE, highlightActiveLine=FALSE, ...)
#'
#' @import shinyAce
#'
ace_editor.server <- function(input, output, session, display_text)
observe(label='ace_editor/observe', x={
updateAceEditor(session=session, editorId='ace_editor', value=display_text())})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.