viewer
Version:
A viewer for documents converted with the Box View API
43 lines (27 loc) • 858 B
Markdown
for the original document from the Box View API.
* [Usage](
* [Options](
* [API Methods](
Include `download.js` in your page.
Example:
```js
var viewer = Crocodoc.createViewer('.viewer', {
// ...
plugins: {
download: {
url: '<the download URL>'
}
}
});
```
The following configuration options are available:
**url**
The URL to the Box View download endpoint associated with the viewing session. This would be available in the View API session response under `urls.download` if the session was created with the `is_downloadable` flag.
The following method is added to the viewer API when using the download plugin:
**download()**
Initiate a download for the document.
A simple plugin that initiates a download