Shortcode renders the latest embed code
eyeseast opened this issue · comments
Chris Amico commented
Here's an example, direct from DC:
<div id="DV-viewer-1011044-redwood-charging-docs" class="DV-container"></div>
<script src="//s3.amazonaws.com/s3.documentcloud.org/viewer/loader.js"></script>
<script>
DV.load("//www.documentcloud.org/documents/1011044-redwood-charging-docs.js", {
width: 500,
height: 600,
sidebar: false,
container: "#DV-viewer-1011044-redwood-charging-docs"
});
</script>
<noscript>
<a href="http://s3.documentcloud.org/documents/1011044/redwood-charging-docs.pdf">Redwood Charging Docs (PDF)</a>
<br />
<a href="http://s3.documentcloud.org/documents/1011044/redwood-charging-docs.txt">Redwood Charging Docs (Text)</a>
</noscript>
This needs to set width: '100%'
like the current version does, to keep it semi-responsive.
Chris Amico commented
Looking at this closer, it looks like the only thing new here is the noscript
links, and those use the document's title. We don't have that unless a) the user copies it into the shortcode or b) we fetch it via the API. Either way makes this a bigger change. Going to set this aside for now.