Description Usage Arguments Examples
One and only function of this htmlwidget which runs
flowtype.js on a
CSS selector
of your choice. By default, body
will be
the CSS selector
, so all text on the page will adjust to flowtype.
1 2 3 |
selector |
|
minimum |
|
maximum |
|
minFont |
|
maxFont |
|
fontRatio |
|
width |
a valid |
height |
a valid |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ## Not run:
library("flowtypeR")
library("htmltools")
# get NEWS from http://cran.r-project.org/doc/manuals/r-devel/NEWS.html
browsable(
tagList(
HTML(
readLines("http://cran.r-project.org/doc/manuals/r-devel/NEWS.html")[8:145]
)
,flowtype()
)
)
# using about.html from R help
library("flowtypeR")
library("htmltools")
library("shiny")
about_html <- readLines(file.path(R.home("doc/html"),"about.html"))
browsable(
tagList(
bootstrapPage(
tags$div(class="row"
,tags$div(class="col-xs-6"
,tags$h1("with flowtype")
,tags$div(
id="flowtype-resize"
,style="padding:0em 1em 0em 1em; border: 2px solid gray;"
,HTML(
about_html[do.call(seq,as.list(grep(x=about_html,pattern="<h2>")+c(0,-1)))]
)
)
)
,tags$div(class="col-xs-6"
,tags$h1("without flowtype")
,tags$div(id="flowtype-resize"
,style="padding:0em 1em 0em 1em; border: 2px dashed gray;"
,HTML(
about_html[do.call(seq,as.list(grep(x=about_html,pattern="<h2>")+c(0,-1)))]
)
)
)
)
)
,flowtype(
'#flowtype-resize'
,minFont = 12
,fontRatio = 20
)
)
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.