Rich News
Since API version 1.1.14 news items may contain rich mark-up. A subset of HTML5 is used to facilitate this:
Tags
Tag | Element | Description |
---|---|---|
<a> | Anchor | Hyperlink |
<b> | Bold | Emphasize text by embolding |
<h1> | Heading 1 | Level one heading |
<h2> | Heading 2 | Level two heading |
<h3> | Heading 3 | Level three heading |
<i> | Italic | Emphasize text by italicization |
<img> | Image | Inline image attachment |
<li> | List item | Item in an ordered or unordered list |
<ol> | Ordered list | Enumerated list (not deeper than 2 levels) |
<p> | Paragraph | Divide text into blocks separated by a hard return |
<u> | Underline | Emphasize text with underline |
<ul> | Unordered list | Bulleted list (not deeper than 2 levels) |
News items with an HTML body (htmlBody
property) will also have an autogenerated plain text body (body
property). In write context these two properties are mutually exclusive.
See Also
Example HTML Body
<h1>This is an <b>H1</b> heading</h1>
<h2>This is an <i>H2</i> heading</h2>
<h3>This is an <u>H3</u> heading</h3>
<p>This is a paragraph</p>
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Nested list
<ul>
<li>Eleven</li>
<li>Twelve</li>
</ul>
</li>
</ol>
<ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
<li>Nested list
<ol>
<li>Eleventh</li>
<li>Twelfth</li>
</ol>
</li>
</ul>
<p><a href="https://www.speakap.com/">Click on this link</a></p>
Attachments
All kinds of files can be attached to a news item. This can be achieved by having an anchor (<a>
) or image (<img>
) element referring to a file message from the list of attachments:
Inline Image
<img src="https://speakap.speakap.com/files/1234567890ABCDEF/"
data-eid="1234567890ABCDEF"
data-rel="attachment"
/>
{
"attachments": [
{
"EID": "1234567890ABCDEF",
"type": "message"
}
]
}
Inline Download
<a src="https://speakap.speakap.com/files/ABCDEF9876543210/"
data-eid="ABCDEF9876543210"
data-rel="attachment"
/>
{
"attachments": [
{
"EID": "ABCDEF9876543210",
"type": "message"
}
]
}