Description Usage Arguments Value See Also Examples
View source: R/input-textmarkup.R
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.
1 2 |
inputId |
The |
labels |
Display labels for the control, or |
values |
A list of vectors of initial values. |
width |
The width of the input, e.g., |
height |
The height of the input, e.g., |
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. |
A text markup input control that can be added to a UI definition.
updateTextMarkupInput
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.