hide_editor: Hide the editor

Description Usage Arguments Value Examples

View source: R/shinymarkdown.R

Description

Hide the editor

Usage

1

Arguments

.id

The inputId of the editor.

Value

NA; used for side effects to hide the editor instance defined with mdInput.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
if(interactive()) {

library(shiny)
library(shinymarkdown)
ui <- fluidPage(
mdInput(inputId = "myEditor", height = "500px", hide_mode_switch = F)
)

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

# Hide the editor
observeEvent(input$hide, {hide_ediotr(.id = "myEditor")})

# Show the editor
obseveEvent(input$show, {show_editor(.id = "myEditor")})

}

shinyApp(ui, server)

}

jdtrat/shinymarkdown documentation built on March 18, 2021, 11:40 a.m.