render_html_fragment: Renders and returns an HTML fragment

View source: R/render_html_fragment.R

render_html_fragmentR Documentation

Renders and returns an HTML fragment

Description

This is a wrapper around the ⁠rmarkdown::[render][rmarkdown::render]⁠ function. The principal difference is that the function is designed to return an HTML fragment (rather than writing to a file). This function is useful to populate the content of a modal window.

Usage

render_html_fragment(input, output_format = rmarkdown::html_fragment(), ...)

Arguments

input

character, path to input file

output_format

rmarkdown output format, provided so you can specify arguments

...

other arguments passed to ⁠rmarkdown::[render][rmarkdown::render]⁠

Details

This function is being deprecated in favor of ⁠shiny::[includeMarkdown][shiny::includeMarkdown]⁠

Value

⁠htmltools::[tag][htmltools::tag]⁠

Examples

## Not run: 
my_file <- system.file("markdown", "modal.md", package = "bsplus")
render_html_fragment(my_file)

## End(Not run)

ijlyttle/bsplus documentation built on June 13, 2025, 1:54 p.m.