Overview
The Magic Embed and
RSS integrations automatically
extract content from your web page such as the title, author, and publish date.
If you wish to explicitly set these fields you can add some data attributes to
your HTML. Additionally, when submitting HTML content through the API,
you can use data attributes to explicitly set these fields and control various
aspects of your content.
Global attributes
The following data attributes can be added anywhere in your web page. In the
example below, they are added to the <body>
tag:
<html>
<head>
<title>This title won't be used</title>
</head>
<body data-beyondwords-title="My Title"
data-beyondwords-author="Jane Doe"
data-beyondwords-publish-date="2023-01-01T12:00:00Z"
data-beyondwords-published="false"
data-beyondwords-ads-enabled="false"
data-beyondwords-title-voice-id="784"
data-beyondwords-body-voice-id="2194"
data-beyondwords-summary-voice-id="2194"
data-beyondwords-article-language="en_GB">
</body>
</html>
Publish date
The date at which the article was published. If it is in the future then the
audio will not load in the player until the specified time.
A timezone suffix may be specified, e.g. Z
or +01:00
. Defaults to UTC.
Published
If published is false then the audio will not load in the player, regardless
of the publish date attribute. The audio is still generated and the content will
still appear in the dashboard.
Voice IDs
The voices that should be used for the title, summary and body
section of your article. You can copy voice IDs from the voices in the dashboard
under Project > Preferences > Voices tab, or fetch them from the
API. If not specified, the
default voice for your project will be used.
Article language
The default language of your article which affects audio synthesis. If not
specified, the default language for your project will be used.
Scoped attributes
The following data attributes can be added to your web page to override the
behavior for specific parts of your content.
Voice IDs
The following voice IDs will take precedence over the default voice IDs.
<p data-beyondwords-voice-id="784">
This paragraph will be voiced by Joe.
</p>
<div data-beyondwords-voice-id="2194">
<p>This paragraph will be voiced by Eddie.</p>
<p>This one, too.</p>
</div>
Language
The following languages will take precedence over the default language:
<p data-beyondwords-language="en_GB">
This paragraph will be read out in British English.
</p>
<p data-beyondwords-language="fr_FR">
Ce paragraphe sera lu en français.
</p>
Feature image
The feature image attribute can be added to an image on your web page to make
it the primary image for your article:
<img
data-beyondwords-feature-image="true"
src="https://example.com/image.jpeg"
/>
The feature image will appear in videos along with any other images extracted
from the HTML.