Skip to contents

Registers an HTML serialiser for plumber2::plumber2 that renders shiny tags and taglists via htmltools::doRenderTags(). This is preferrable over htmltools::renderTags() as often we want to be able to emit head tags which htmltools::htmltools attempts to hide for shiny usecases.

Usage

register_html_serialiser(force = FALSE)

Arguments

force

bypass checks and re-register the freshwater serialiser

Details

The freshwater serialiser safely falls back to the default plumber2 implementation for other classes of inputs.

Specifically, if an input inherits shiny.tag, shiny.tag.list or html, it will be serialised via htmltools::as.tags() and htmltools::doRenderTags(). Otherwise, the default HTML serialiser will be used. If missing, the input will be coerced via as.character().

Registration affects global process state, not just the current API process.