Wrap text in text boxes.

Usage

TB(text = "clipboard", ..., col = "white", border = "black", padding = 10, lty = "solid", 
  lwd = 1, bor.rad = 5, bold = FALSE, font.col = "black", copy2clip = interactive(), 
      print = FALSE)

TB2(text = "clipboard", width = nchar(text), text_align = "center", box_align = "left", 
      copy2clip = interactive(), print = FALSE)

Arguments

text
A character vector or text copied to the clipboard. Default is to read from the clipboard.
...
Other arguments passed to style in the HTML div tag.
col
The color(s) to fill or shade the rectangle with.
border
The color for rectangle border(s).
padding
The distance (in px) between the text and the border.
lty
The line type for borders (either "solid" or "dashed").
lwd
The line width (in px) for borders and shading.
bold
logical. If TRUE the font will be boldfaced.
font.col
The color of the font.
bor.rad
The degree (in px) to which the corners are rounded; 0 results in square corners.
copy2clip
logical. If TRUE attempts to copy the output to the clipboard.
print
logical. If TRUE cat prints the output to the console. If FALSE returns to the console.
width
The width, in characters, to make the box.
text_align
Alingment of text in the box; takes the values c("left", "right", "top", "middle", "bottom").
box_align
Alingment of textbox; takes the values c("left", "right", "top", "middle", "bottom").

Value

Returns a character vector of an HTML text box tag.

Description

TB - Generates an HTML text box tag.

TB2 - Generates an HTML writable text box tag.

Examples

TB("I like ice cream!", print=TRUE)
I like ice cream!
TB("Free cookies for a year!", col = "red", font.col="white", print=TRUE)
Free cookies for a year!
TB("Bad Robot!", "font-style:italic", print=TRUE)
Bad Robot!
TB2("I like ice cream!", print=TRUE)
TB2("Free cookies for a year!", print=TRUE)