Blackboard Markup Language - BbML

Author: Scott Hurrey
Categories: []
Tags: [‘rest’, ‘language’, ‘taglibs’, ‘blackboard’, ‘markup’, ‘bbml’, ‘developer’]



BbML is a subset of HTML. The parameters of some methods accept BbML-formatted text. For more information about particular Learn REST endpoints, see the REST API documentation.

BbML specification - version 1

A BbML field accepts text containing either:

  • Ultra experience courses: BbML
  • Original experience: safe HTML
  • Either experience outside of the context of courses: safe HTML

Valid BbML uses only following HTML elements and only the attributes accepted for each element. You can use attributes marked Internal use only as part of a REST API GET method when you are patching/updating an existing resource. Do not use them to create a resource from scratch.

  • a
  • br
  • del
  • div
  • em
  • h4
  • h5
  • h6
  • img
  • li
  • ol
  • p
  • span
  • strong
  • sub
  • sup
  • ul

For more information about each accepted element, see below.


Attribute Comment
data-bbid Deprecated Internal use only.
data-bbfile Rendering control for use with Ultra UI. data-bbfile="{"render":"inline","linkName":"1.jpg","mimeType":"image/jpeg"}"
data-bbtype Internal use only.
data-mce-href Internal use only.


Attribute Comment
data-mce-bogus Internal use only.



Attribute Comment
data-bbid Internal use only.






Attribute Comment
data-mathml MathML from which the image was created if applicable.
data-mce-src Internal use only.



Attribute Comment
data-mce-style Internal use only.
style[list-style-type: *]  



Attribute Comment
data-mce-bogus Internal use only.
data-mce-style Internal use only.
style[font-style: ,font-weight: *,text-decoration:]  





Attribute Comment
data-mce-style Internal use only.
style[list-style-type: *]  


If one were to use the following as the input to a BbML field of a resource within an Ultra course context, such as an Ultra Document:

<!-- {"bbMLEditorVersion":1} -->

<div data-bbid="bbml-editor-id_9c6a9556-80a5-496c-b10d-af2a9ab22d45">

<h2>Header Large</h2>

<h5>Header Medium</h5>

<h6>Header Small</h6>

<p><strong>Bold </strong><em>Italic <span style="text-decoration:
underline;">Italic Underline</span></em></p>


<li><span style="text-decoration: underline;"><em></em></span>Bullet 1</li>

<li>Bullet 2</li>


<p><img > </p>

<p><span>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco

<p><span>&lt;braces test="values" other="encoded values"&gt;</span></p>

<p>Header Small</p>


<li>Number 1</li>

<li>Number 2</li>


<p>Just words followed by a formula <img align="middle" alt="3 divided by 4 2
root of 7" class="Wirisformula"







It would render as follows in Ultra UI:


Uploaded files

When creating content using the Learn Public REST API, it is expected that any related file content be uploaded prior to creation. Uploading files can be done using the upload file endpoint documented at

Once a file has been uploaded, the upload file endpoint will have provided an Id which will be used to reference the associated file.

Using the upload file id withing the Learn Public REST API, any BbML anchor tag href attribute can be used to associate the uploaded file using the following notation:

    <a href="bbupload://<uploadFileId>">filename.ext</a>

For proper formatting and rendering within the ULTRA environment, it is recommened to also include a data-bbfile attribute. An example value of this can be seen above in the BbML specification section. However, to describe it a bit more, the data-bbfile attribute’s value is an HTML encoded json string:

HTML encoded: {"render":"inline","linkName":"1.jpg","mimeType":"image/jpeg"}
HTML decoded: {"render":"inline","linkName":"filename.ext","mimeType":"image/jpeg"}

  • render: At this time, it is recommended to only use ‘inline.’
  • linkName: The filename of the uploaded file.
  • mimeType: The MIME type of the uploaded file.`

The end result of all this would be as follows:

    <a href="bbupload://<uploadFileId>" data-bbfile="{&quot;render&quot;:&quot;inline&quot;,&quot;linkName&quot;:&quot;filename.ext&quot;,&quot;mimeType&quot;:&quot;image/jpeg&quot;}">  

File Type Documentation

The editor recognizes the following values for data-bbfile, with the arguments it accepts for data-bbtype. For each plugin, the bbml element is given (usually a); the value of data-bbtype which selects that plugin; and the fields of data-bbfile which are expected. (data-bbfile is a JSON-encoded object.)

For example, for the Attachment plugin, the generated bbml is as follows (minus unneccessary whitespace I’ve added for easy viewing):

<a href="" 

Tags without a data-bbfile attribute, or with an unrecognized value for data-bbfile, are displayed normally.

Plugin Name: Attachment
element: <a href="${link}">
data-bbtype: attachment

  • linkName - the name of the file
  • render -
    • “inline” to render images/video/audio/etc inline
    • “attachment” to show as a block
  • alternativeText - alt text for accessibility
  • mimeType - the mime type of the file
  • isDecorative - a flag indicating whether the image is decorative. Currently always false for images generated in Ultra.


  1. The href attribute is the download url for the document.
  2. Attachments can be add from the local file system or the cloud (via Kloudless). After the item has been added, there is no way of distinguishing this.
  3. Attachments, whether displayed inline or not, are full-width.

Plugin Name: Block Images
element: <a href="${src}">
data-bbtype: image
data-bbfile: alt - the image alt text


  1. Displays an image as a full-width block (instead of inline.)
  2. All images generated by Ultra are full-width blocks, but images converted from Learn are regular <img> elements.
  3. The href attribute in the bbml tag becomes the src attribute of the img tag.
  4. Mathml images (as generated by Wiris) are regular img elements that have the data-mathml attribute. It is beyond the scope of this document to describe the wiris service; however, no additional processing beyond that of a regular img tag is required to render mathml images.

Plugin Name: Custom Class
element: <a>
data-bbtype: customClass
data-bbfile: className


  1. Transforms into <span class="${className}">.
  2. This type will never be encountered in saved bbml; it is generated at runtime to modify the editor display.

Plugin Name: Embedded Video
element: <a>
data-bbtype: video
data-bbfile: src - The link for the embedded video


  1. Links to an embedded video from Youtube or Video which is shown in an iframe.
  2. Only links from Youtube or Vimeo are allowed.

Plugin Name: LTI Content Market
element: a
data-bbtype: lti

  • linkType - ‘resource/x-bb-bltiplacement’
  • linkRefId - The PK of the placement record
  • Partner Cloud
    • “linkType” - ‘resource/x-bbgs-partner-cloud’
    • “linkRefId” - The partner tool ID. Usually some concatenation of partner ID + the tool ID
  • LTI Link
    • “linkType” - ‘resource/x-bb-blti-link’
    • “linkRefId” - The PK of the parent IMS Deep Linking placement. Used to look up key/secret at launch
    • “url” - LTI Tool Url
    • “launchInNewWindow” - Whether to launch in an iframe or new window
    • “customParameters” - Custom parameters to pass with the launch as JSON


  1. It is beyond the scope of this document to describe LTI links.

Plugin Name: Video Everywhere (aka Collab Integration; aka Collab Video; aka Video Integration)
element: <img title="description" alt="alt text">
data-bbtype: collab_video
data-bbfile: video_uuid - The uuid of the collab video.


  1. src is a relative image link returned by the collab service.
  2. title is the description of the video.
  3. alt is the alt text of the image.
  4. It is beyond the scope of this document to describe the collab service api.