Create a tiddlywiki widget from htmlwidget
Examples
library(leaflet)
content <- paste(sep = "<br/>",
"<b><a href='http://www.samurainoodle.com'>Samurai Noodle</a></b>",
"606 5th Ave. S",
"Seattle, WA 98138"
)
widget <- leaflet() %>% addTiles() %>%
addPopups(-122.327298, 47.597131, content,
options = popupOptions(closeButton = FALSE)
)
tw_widget(widget)
#> [1] "<$htmlwidgets type=\"leaflet\" uuid=\"htmlwidget-ac96cb3ee4656e2e9ec3\" data=\"\"\"{\"x\":{\"options\":{\"crs\":{\"crsClass\":\"L.CRS.EPSG3857\",\"code\":null,\"proj4def\":null,\"projectedBounds\":null,\"options\":{}}},\"calls\":[{\"method\":\"addTiles\",\"args\":[\"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\",null,null,{\"minZoom\":0,\"maxZoom\":18,\"tileSize\":256,\"subdomains\":\"abc\",\"errorTileUrl\":\"\",\"tms\":false,\"noWrap\":false,\"zoomOffset\":0,\"zoomReverse\":false,\"opacity\":1,\"zIndex\":1,\"detectRetina\":false,\"attribution\":\"© <a href='https://openstreetmap.org/copyright/'>OpenStreetMap<\\/a>, <a href='https://opendatacommons.org/licenses/odbl/'>ODbL<\\/a>\"}]},{\"method\":\"addPopups\",\"args\":[47.597131,-122.327298,\"<b><a href='http://www.samurainoodle.com'>Samurai Noodle<\\/a><\\/b><br/>606 5th Ave. S<br/>Seattle, WA 98138\",null,null,{\"maxWidth\":300,\"minWidth\":50,\"autoPan\":true,\"keepInView\":false,\"closeButton\":false,\"className\":\"\"}]}],\"limits\":{\"lat\":[47.597131,47.597131],\"lng\":[-122.327298,-122.327298]}},\"evals\":[],\"jsHooks\":[]}\"\"\"/>"