markdown | R Documentation |
This function accepts Markdown-syntax text and returns HTML that may be included in Shiny UIs.
markdown(mds, extensions = TRUE, .noWS = NULL, ...)
mds |
A character vector of Markdown source to convert to HTML. If the vector has more than one element, a single-element character vector of concatenated HTML is returned. |
extensions |
Enable Github syntax extensions; defaults to |
.noWS |
Character vector used to omit some of the whitespace that would
normally be written around generated HTML. Valid options include |
... |
Additional arguments to pass to |
Leading whitespace is trimmed from Markdown text with glue::trim()
.
Whitespace trimming ensures Markdown is processed correctly even when the
call to markdown()
is indented within surrounding R code.
By default, Github extensions are enabled, but this
can be disabled by passing extensions = FALSE
.
Markdown rendering is performed by commonmark::markdown_html()
. Additional
arguments to markdown()
are passed as arguments to markdown_html()
a character vector marked as HTML.
ui <- fluidPage(
markdown("
# Markdown Example
This is a markdown paragraph, and will be contained within a `<p>` tag
in the UI.
The following is an unordered list, which will be represented in the UI as
a `<ul>` with `<li>` children:
* a bullet
* another
[Links](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) work;
so does *emphasis*.
To see more of what's possible, check out [commonmark.org/help](https://commonmark.org/help).
")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.