grid.html: Render HTML Content

Description Usage Arguments Value Author(s) See Also Examples

View source: R/grid.R

Description

This function renders HTML content.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
grid.html(...)
htmlGrob(html, ...)
## Default S3 method:
htmlGrob(html, ..., css="", assets=NULL)
## S3 method for class 'htmlDocument'
htmlGrob(html, 
                                x=0.5, y=0.5,
                                width=NULL, height=NULL,
                                default.units="npc",
                                just="centre",
                                fonts="sans",
                                device=currentDevice(),
                                engine=getOption("layoutEngine.backend"),
                                viewports=FALSE,
                                gp=gpar(), name=NULL, ...)
## S3 method for class 'flowedhtml'
htmlGrob(html, 
                              x=0.5, y=0.5, 
                              default.units="npc",
                              just="centre",
                              viewports=FALSE,
                              gp=gpar(), name=NULL, ...) 

Arguments

html

A character vector, an "htmlDocument" object (as generated by htmlDocument, or an "flowedhtml" object (as generated by flow).

css

A character vector describing CSS styling for the HTML content.

assets

Zero or more paths to external assets (e.g., image files) for the HTML content.

x, y

Numeric values or grid units specifying the location of the rendered output.

width, height

grid units specifying the total width and height to use for the layout.

default.units

The grid unit used if the locations or dimensions are given as just numeric values.

just

Justification of the rendering relative to its (x, y) location.

fonts

A character vector containing R font family names.

device

The name of the device that will be used to render the layout.

engine

The backend that will perform the layout (e.g., cssboxEngine from the layoutEngineCSSBox package).

viewports

A logical value indicating whether to generate grid viewports for each laid out HTML element.

gp

Graphical parameters, typically the output from a call to the function gpar.

name

A character identifier.

...

Arguments passed to htmlGrob or used by methods.

Value

An "htmlgrob" object or a "flowedhtmlgrob" object.

Author(s)

Paul Murrell

See Also

flow

Examples

1
grid.html("<p>test</p>")

pmur002/layoutengine documentation built on June 20, 2020, 10:32 p.m.