开发者 |
chrisamico
reefdog freedmand |
---|---|
更新时间 | 2025年9月24日 23:41 |
PHP版本: | 5.0 及以上 |
WordPress版本: | 6.8 |
版权: | GPLv2 |
版权网址: | 版权信息 |
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.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
.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 documentOnly 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.wp-content/plugins/documentcloud
[documentcloud]
shortcodeheight/width
attributes) at Settings > DocumentCloud. (This default width will only be used if you set responsive="false"
on an embed.)responsive
URL parameter option.
All embeds are rendered responsively, so this option is now deprecated.
The height and width of the embed can still be controlled with their respective options.mode
parameter to control document viewer display mode. Valid values: document
, notes
, text
, grid
.onlyshoworg
- When set to 1 it only displays the organization namepdf
- When set to 1 it shows a pdf download iconshowfullscreen
- When set to 1 it displays a full screen icon.title
- When set to 1 it displays the title of the document.url
) (#48)default_page
and default_note
options back to page
and note
(#47)sidebar
, text
, and pdf
default valuespostmeta
tablecontainer
, responsive
, responsive_offset
, default_page
, default_note
, notes
, search
, and zoom
.id
attribute. It's still usable, but support may drop in the future. Use url
instead.