plugin-icon

DocumentCloud

Von muckrock·
Embed DocumentCloud resources in WordPress content.
Bewertung
4/5
Version
0.7.0
Aktive Installationen
1K
Zuletzt aktualisiert
Sep 24, 2025

DocumentCloud is a service that allows journalists to analyze, annotate and publish documents, hosted by Investigative Reporters & Editors. Initial development of this plugin supported by NPR as part of the StateImpact project.

This plugin allows you to embed DocumentCloud resources using either the raw URL on its own line:

Here's something you should really take a look at: https://www.documentcloud.org/documents/282753-lefler-thesis.html Isn't that interesting?

Or a custom shortcode:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html"]

When you save, WordPress fetches and stores the actual embed code HTML from the DocumentCloud servers using oEmbed. You can freely toggle between visual and HTML mode without mangling embed code, and your embed will always be up to date with the latest embed code.

By default, documents will have a responsive width (it will narrow and widen as necessary to fill available content area) and use the theme’s default height. If you want to override this, you can either set responsive="false" or explicitly set a width:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html" width="600"]

You can set your own defaults in Settings > DocumentCloud, but default widths will be ignored unless responsive is disabled:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html" responsive="false"]

To embed a single page, use any page-specific URL. Pages ignore width/height and always act responsively:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html#document/p1"]

To embed a note, use any note-specific URL. Notes ignore width/height and always act responsively:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html#document/p1/a53674"]

To control which view is displayed by default, use the mode parameter:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html" mode="notes"] [documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html" mode="text"] [documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html" mode="grid"]

Here’s the full list of embed options you can pass via shortcode attributes; some are specific to the type of resource you’re embedding.

All resources:

  • url (required, string): Full URL of the DocumentCloud resource.
  • container (string): ID of element to insert the embed into; if excluded, embedder will create its own container.

Documents only:

  • height (integer): Maximum height (in pixels) of the embed.
  • width (integer): Maximum width (in pixels) of the embed.
  • page (integer): Page number to have the document scroll to by default.
  • note (integer): ID of the note that the document should highlight by default.
  • notes (boolean): Hide or show notes.
  • search (boolean): Hide or show search form.
  • sidebar (boolean): Hide or show sidebar.
  • pdf (boolean): Hide or show link to download original PDF.
  • text (boolean): Hide or show text tab.
  • zoom (boolean): Hide or show zoom slider.
  • mode (string): Display mode for the document viewer. Valid values: document, notes, text, grid. Controls which view is shown by default.
  • format (string): Indicate to the theme that this is a wide asset by setting this to wide. Defaults normal.

Or as a Gutenberg Block:

DocumentCloud

Here’s the list of settings that can be used for the block: – WIDTH (number): Sets the width of the document (optional) – HEIGHT (number): Sets the height of the document (optional) – STYLE (string): Adds additional style to the embedded document (optional)

The following options can only be used for Documents: – Show Title (toggle): Determines whether to show the title of the embedded document – Show FullScreen Button (toggle): Determines whether to show a full screen icon on the document – Only Show Organization (toggle): Determines whether to only show the organization name that published the document. – Show PDF Download Link (toggle): Determines whether to show the download as pdf icon for documents.

Note – The default width and height from the Settings does not work for the Gutenberg Block.

You can read more about publishing and embedding DocumentCloud resources on https://www.documentcloud.org/help/publishing.

Kostenlosmit dem Business-Tarif
Mit deiner Installation stimmst du den Geschäftsbedingungen von WordPress.com sowie den Bedingungen für Drittanbieter-Plugins zu.
Getestet bis
WordPress 6.8.3
Dieses Plugin steht für deine -Website zum Download zur Verfügung.