Skip to content

Current implementation - thoughts? #1

Description

@jdtrat

@nstrayer, what do you think of the current implementation? A simple app showcasing the features:

  • marker() has different arguments for customizing editor functionality -- uses {whisker} to render (may remove that dependency).
  • Functions to get the markdown or HTML text
  • Functions to hide/show the editor.
remotes::install_github("jdtrat/shinymarkdown")
library(shiny)
library(shinymarkdown)
ui <- fluidPage(
  use_shinymd(),
  marker(height = "600px", preview_style = "vertical"),
  actionButton("get_md", "Get Markdown"),
  actionButton("get_html", "Get HTML"),
  actionButton("hide_editor", "Hide the Editor"),
  actionButton("show_editor", "Show the Editor")
)

server <- function(input, output, session) {
  
  observeEvent(input$get_md, {print(get_markdown())})
  
  observeEvent(input$get_html, {print(get_html())})
  
  observeEvent(input$hide_editor, {hide_editor()})
  
  observeEvent(input$show_editor, {show_editor()})
  
}

shinyApp(ui, server)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions