Embed template
Embed codes for published graphics.
embedTemplate.declaration
- Type:
(templateArgs: { embedUrl: string; embedSlug: string }) => string;
- Default:
({ embedUrl, embedSlug }) =>`<div id="${embedSlug}"></div><script type="text/javascript">new pym.Parent("${embedSlug}", "${embedUrl}", {});</script>`;
The embed code for an embeddable graphic.
embedTemplate.dependencies
- Type:
(args: { embedUrl: string; embedSlug: string }) => string;
- Default:
() =>`<script type="text/javascript" src="//graphics.thomsonreuters.com/pym.min.js"></script>`;
Dependencies include any scripts that should be included only once per page, usually in the <head>
.