Tools for HTML

Tools for HTML generation and output.


News

  • as.character now returns a character vector with no other attributes. Previously it returned a character vector of class 'html'. (#31, #41)

  • htmlTemplate now can use a string as a template instead of requiring a file. (#41, #43)

  • HTML dependencies can now be added inline, instead of needing to use attachDependencies(). (#40, #42)

  • htmlDependency() gained a new argument all_files to indicate whether all files under the src directory should be copied when rendering dependencies, or only those specified in the dependency objects. (#48)

  • copyDependencyToDir() will always completely overwrite the target directory when copying HTML dependency files to make sure all dependency files are definitely updated in the target directory when the original dependency directory has been updated. In the past, the dependency files were not updated if they already existed. (#36)

  • The version number in the directory name of an HTML dependency can be suppressed by setting options(htmltools.dir.version = FALSE) when the dependency is copied via copyDependencyToDir(). (#37)

  • Performance improvement rendering tags, by switching from readLines to readChar.

  • Add css function for conveniently forming CSS declaration strings.

  • Add template support, with the htmlTemplate(), renderDocument(), and suppressDependencies() functions.

  • Add check that htmlDependency() isn't called with an absolute path when a binary package is built. (#22)

  • Allow HTML content to include UTF-8, Latin1, and system encoded content. All will be converted to UTF-8 using enc2utf8() at render time. (#21)

  • Add tagGetAttribute() and tagHasAttribute() functions.

  • Add "append" parameter to attachDependencies, to allow adding dependencies, instead of replacing them.
  • Add "attachment" parameter to htmlDependency, which can be used to allow any file in the dependency directory to be available via URL at runtime.
  • Explicit library(htmltools) is no longer required for tags to be rendered in knitr/rmarkdown documents.

  • Added "viewer" parameter to html_print.

Initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("htmltools")

0.3.6 by Joe Cheng, 5 months ago


https://github.com/rstudio/htmltools


Report a bug at https://github.com/rstudio/htmltools/issues


Browse source code at https://github.com/cran/htmltools


Authors: RStudio, Inc.


Documentation:   PDF Manual  


Task views: Reproducible Research


GPL (>= 2) license


Imports utils, digest, Rcpp

Suggests markdown, testthat

Enhances knitr

Linking to Rcpp


Imported by BETS, DT, DiagrammeR, HARtools, Hmisc, ReporteRs, SciencesPo, antaresViz, bea.R, blastula, blogdown, bookdown, bsplus, colourpicker, condformat, crosstalk, d3r, desctable, dygraphs, expss, flexdashboard, flextable, formattable, ggiraph, ggvis, googleway, highcharter, htmltidy, htmlwidgets, huxtable, lazyrmd, leaflet, leaflet.esri, leaflet.extras, leaflet.minicharts, leafletCN, learnr, listviewer, manipulateWidget, mapedit, mapview, metricsgraphics, miniUI, officer, packagedocs, papayar, pivottabler, pixiedust, pkggraph, plotly, pointblank, questionr, rAmCharts, radarchart, reactR, rgl, rmarkdown, rmdformats, rms, sergeant, shiny, shiny.semantic, shinyBS, shinyDND, shinyFiles, shinyHeatmaply, shinyTime, shinyWidgets, shinybootstrap2, shinydashboard, shinyjs, sparkline, sunburstR, tableHTML, tangram, timevis, tint, tmap, trelliscope, tufte, vegalite, vembedr, visNetwork, widgetframe, xaringan.

Depended on by SmarterPoland, summarytools.

Suggested by FSelectorRcpp, LDAvis, covr, fontquiver, gdtools, mschart, networkD3, parlitools, polmineR, qtlcharts, rhandsontable, rpivotTable, rvg, stringr, svgPanZoom, svglite, unpivotr.


See at CRAN