doc_embed: Embed document

Description Usage Arguments Details Value Author(s) References Examples

View source: R/doc_embed.r

Description

Write code to embed Scribd document in an HTML page

Usage

1
2
3
doc_embed(doc, div.id = "embedded_doc", 
          onDocReady = NULL, addParam = NULL,
          beforewrite = NULL, afterwrite = NULL, ...)

Arguments

doc

A document id (or object of class “scribd_doc”) to embed.

div.id

A name to use as the id attribute of an HTML <div>, in which the document will be embedded. This is useful if you plan to embed multiple documents in a single HTML page.

onDocReady

A character string containing the body of a javscript function called onDocReady that will be called once the document is embedded in the page.

addParam

A named list of parameters to add to the javascript before writing the embedded document to the page. See here for further details.

beforewrite

A character string containing valid javascript code to write to the script prior to the document being written to the page.

afterwrite

A character string containing valid javascript code to write to the script after the document is written to the page.

...

Ignored.

Details

This function builds a simple snippet of HTML and javascript to produce an iframe-embedded Scribd document. The addParam argument can be used to control the appearance of the embedded document.

Value

A character string containing the HTML and javascript code.

Author(s)

Thomas J. Leeper

References

Javscript API Reference

Examples

1
2
3
4
5
## Not run: 
d <- docs_list()
cat(doc_embed(d[[1]]))

## End(Not run)

cloudyr/rscribd documentation built on May 13, 2019, 8:22 p.m.