Plugin: DocumentCloud
DocumentCloud is a free service allowing journalists to store, analyze, annotate and publish documents.
DocumentCloud's normal embed code looks like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="DV-viewer-265231-11-07-2011-letter-to-idaho-congressional" class="DV-container"></div> | |
<script src="http://s3.documentcloud.org/viewer/loader.js"></script> | |
<script> | |
DV.load('http://www.documentcloud.org/documents/265231-11-07-2011-letter-to-idaho-congressional.js', { | |
width: 600, | |
height: 450, | |
sidebar: false, | |
container: "#DV-viewer-265231-11-07-2011-letter-to-idaho-congressional" | |
}); | |
</script> |
That works great as long as you edit in HTML mode. Switch to the visual editor, and your container div
disappears and your JavaScript is broken.
To get around this, use this short code:
[documentcloud id="265231-11-07-2011-letter-to-idaho-congressional"]
Or use the URL from DocumentCloud:
[documentcloud url="http://www.documentcloud.org/documents/265231-11-07-2011-letter-to-idaho-congressional.html"]
You can set your embedded documents' height and width by setting values in the shortcode or on the DocumentCloud settings page in your WordPress admin.
[documentcloud id="265231-11-07-2011-letter-to-idaho-congressional" height=400 width=300]