documentcloud / wordpress-documentcloud

Embed DocumentCloud documents that won't be eaten by the visual editor

Home Page:https://wordpress.org/plugins/documentcloud/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support embedding a single note

eyeseast opened this issue · comments

Here's the embed code:

<div id="DC-note-138916" class="DC-note-container"></div>
<script src="//s3.amazonaws.com/s3.documentcloud.org/notes/loader.js"></script>
<script>
  dc.embed.loadNote('http://www.documentcloud.org/documents/1001227/annotations/138916.js');
</script>

From an embedder POV nothing should be different.

We still need an oEmbed endpoint that vends embed codes for notes, documents and search embeds.

One thing i've been pondering is whether or it'd be possible or worthwhile to unify note and document embeds. Notes are slim enough that it'd be possible just to load them along side documents always, and just invoke whichever code was necessary based on what the resource url asks for.

The key capability that would enable is presenting a document as a list of responsive notes on certain devices, rather than trying to tiny-load a little document viewer (which is sort of a not awesome experience).

Renaming this to "Support embedding a single note", since it's actually going to use the same shortcode.