turn_shiny: Turns a string of html into the equivalent shiny code

Description Usage Arguments Value Examples

View source: R/midas_touch.R

Description

Turns a string of html into the equivalent shiny code

Usage

1
turn_shiny(html, remove_newlines = TRUE, file = NULL)

Arguments

html

a string of complete html

remove_newlines

whether or not to remove newlines from the string

file

default (NULL) is to return the object, if this is set it will write to file

Value

a function call that produces the equivalent shiny objects

Examples

1
2
3
html <- '<div class="example"><h3>test</h3></div>'
turn_shiny(html)
eval(turn_shiny(html))

Example output

tag("html", list(tag("body", list(tag("div", list(class = "example", tag("h3", list("test"))))))))
tag("html", list(tag("body", list(tag("div", list(class = "example", tag("h3", list("test"))))))))
[1] "tag(\"html\", list(tag(\"body\", list(tag(\"div\", list(class = \"example\", tag(\"h3\", list(\"test\"))))))))"

midas documentation built on May 1, 2019, 10:09 p.m.

Related to turn_shiny in midas...