A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/juliendiot42/markdownInput below:

juliendiot42/markdownInput: A R-Shiny module for markdown text input

This directory contains the "markdownInput" package for the R programming language. This package is a R-Shiny module providing a Shiny input to write some markdown code and to preview the result. This input has been inspired by the "comment" window of https://github.com/.

To install the stable version from CRAN, simply run the following from an R console:

install.packages("markdownInput")

To install latest development version from GitHub simply run the following from an R console:

# install.package("devtools")
devtools::install_github("juliendiot42/markdownInput")

Once the package is installed, start using it:

In your R console:

library(markdownInput)
help(package=markdownInput)

Once you have downloaded the package, you can run an example app:

In your R console:

markdownInput::runExample()

In the UI part of your app you should call the markdownInput function.

For example:

ui <- fluidPage(titlePanel("Markdown input"),
                 sidebarLayout(
                   # inputs:
                   sidebarPanel(
                     markdownInput(
                       "mdInputID",
                       label = "Write your text",
                       value = "Write some _markdown_ **here:**"
                       )
                   ),

                   # outputs:
                   mainPanel(
                   h3("Raw value of the input:"),
                   verbatimTextOutput("rawResult"))
                 ))

You can access to the input's value in the server side by calling the module:

server <- function(input, output, session) {
    # myText is a reactive variable containing the raw markdown text
    myText <- callModule(moduleMarkdownInput, "mdInputID")

    # show "myText"
    output$rawResult <- renderPrint({
        print(myText())
    })
}

When encountering a problem with the package, you can report issues on GitHub directly here.

You can contribute in various ways:

I invest some time and effort to create this package. Please cite it when using it:

In your R console:

citation("markdownInput")

See also citation() for citing R itself.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4