verbatimTextOutput

0th

Percentile

Create a verbatim text output element

Render a reactive output variable as verbatim text within an application page. The text will be included within an HTML pre tag.

Usage
verbatimTextOutput(outputId, placeholder = FALSE)
Arguments
outputId

output variable to read the value from

placeholder

if the output is empty or NULL, should an empty rectangle be displayed to serve as a placeholder? (does not affect behavior when the the output in nonempty)

Details

Text is HTML-escaped prior to rendering. This element is often used with the renderPrint function to preserve fixed-width formatting of printed objects.

Value

A verbatim text output element that can be included in a panel

Aliases
  • verbatimTextOutput
Examples
# NOT RUN {
## Only run this example in interactive R sessions
if (interactive()) {
  shinyApp(
    ui = basicPage(
      textInput("txt", "Enter the text to display below:"),
      verbatimTextOutput("default"),
      verbatimTextOutput("placeholder", placeholder = TRUE)
    ),
    server = function(input, output) {
      output$default <- renderText({ input$txt })
      output$placeholder <- renderText({ input$txt })
    }
  )
}
# }
Documentation reproduced from package shiny, version 1.1.0, License: GPL-3 | file LICENSE

Community examples

Looks like there are no examples yet.