textMarkupInput: Create a Text Markup Input Control

Description Usage Arguments Value See Also Examples

View source: R/input-textmarkup.R

Description

Create a text markup input control to highlight patterns in text values. Two input fields are created: one to specify the expression to be marked; another where this expression is marked in unstructured text values, e.g., test cases for a regular expression.

Usage

1
2
textMarkupInput(inputId, labels, values = list("", ""), width = NULL,
  height = NULL, placeholders = NULL)

Arguments

inputId

The input slot that will be used to access the values.

labels

Display labels for the control, or NULL for no labels.

values

A list of vectors of initial values.

width

The width of the input, e.g., '100%'; see validateCssUnit.

height

The height of the input, e.g., '400px'; see validateCssUnit.

placeholders

A vector of character strings giving the user a hint as to what can be entered into the control. Internet Explorer 8 and 9 do not support this option.

Value

A text markup input control that can be added to a UI definition.

See Also

updateTextMarkupInput

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Only run examples in interactive R sessions
if (interactive()) {
  library(shiny)
  library(shinyhighlightr)

  ui <- fluidPage(
    textMarkupInput(
      inputId = "highlight", labels = c("Expression", "Test Cases"),
      placeholder = c("Define Expression", "Define Test Cases"),
      values = list(
        "[1-2]{1}[0-9]{3}",
        c(
          "19th century", "1855",
          "between 1905 and 1910"
        )
      )
    )
  )

  server <- function(input, output, session) {

  }

  shinyApp(ui, server)
}

stefanieschneider/shinyhighlightr documentation built on Nov. 5, 2019, 9:21 a.m.