Debian Codegraph @

man/markdown.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/shiny.R
3 \name{markdown}
4 \alias{markdown}
5 \title{Insert inline Markdown}
6 \usage{
7 markdown(mds, extensions = TRUE, .noWS = NULL, ...)
8 }
9 \arguments{
10 \item{mds}{A character vector of Markdown source to convert to HTML. If the
11 vector has more than one element, a single-element character vector of
12 concatenated HTML is returned.}
13
14 \item{extensions}{Enable Github syntax extensions; defaults to \code{TRUE}.}
15
16 \item{.noWS}{Character vector used to omit some of the whitespace that would
17 normally be written around generated HTML. Valid options include \code{before},
18 \code{after}, and \code{outside} (equivalent to \code{before} and \code{end}).}
19
20 \item{...}{Additional arguments to pass to \code{\link[commonmark:commonmark]{commonmark::markdown_html()}}.
21 These arguments are \emph{\link[rlang:dyn-dots]{dynamic}}.}
22 }
23 \value{
24 a character vector marked as HTML.
25 }
26 \description{
27 This function accepts
28 \href{https://en.wikipedia.org/wiki/Markdown}{Markdown}-syntax text and returns
29 HTML that may be included in Shiny UIs.
30 }
31 \details{
32 Leading whitespace is trimmed from Markdown text with \code{\link[glue:trim]{glue::trim()}}.
33 Whitespace trimming ensures Markdown is processed correctly even when the
34 call to \code{markdown()} is indented within surrounding R code.
35
36 By default, \link[commonmark:extensions]{Github extensions} are enabled, but this
37 can be disabled by passing \code{extensions = FALSE}.
38
39 Markdown rendering is performed by \code{\link[commonmark:commonmark]{commonmark::markdown_html()}}. Additional
40 arguments to \code{markdown()} are passed as arguments to \code{markdown_html()}
41 }
42 \examples{
43 ui <- fluidPage(
44 markdown("
45 # Markdown Example
46
47 This is a markdown paragraph, and will be contained within a `<p>` tag
48 in the UI.
49
50 The following is an unordered list, which will be represented in the UI as
51 a `<ul>` with `<li>` children:
52
53 * a bullet
54 * another
55
56 [Links](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) work;
57 so does *emphasis*.
58
59 To see more of what's possible, check out [commonmark.org/help](https://commonmark.org/help).
60 ")
61 )
62 }