Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

renderTags

Render tags into HTML


Description

Renders tags (and objects that can be converted into tags using as.tags) into HTML. (Generally intended to be called from web framework libraries, not directly by most users–see print.html(browse=TRUE) for higher level rendering.)

Usage

renderTags(x, singletons = character(0), indent = 0)

doRenderTags(x, indent = 0)

Arguments

x

Tag object(s) to render

singletons

A list of singleton signatures to consider already rendered; any matching singletons will be dropped instead of rendered. (This is useful (only?) for incremental rendering.)

indent

Initial indent level, or FALSE if no indentation should be used.

Details

doRenderTags is intended for very low-level use; it ignores singleton, head, and dependency handling, and simply renders the given tag objects as HTML.

Value

renderTags returns a list with the following variables:

head

An HTML string that should be included in <head>.

singletons

Character vector of singleton signatures that are known after rendering.

dependencies

A list of resolved htmlDependency objects.

html

An HTML string that represents the main HTML that was rendered.

doRenderTags returns a simple HTML string.


htmltools

Tools for HTML

v0.5.1.1
GPL (>= 2)
Authors
Joe Cheng [aut], Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), Winston Chang [aut], Yihui Xie [aut], Jeff Allen [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.