Slide Bindings

Slide bindings are written directly in the text and can either be of the format <<BindingType:parameter1$parameter2...>> or of the format <<BindingType:parameter1$parameter2...>...<>> when the binding needs to wrap around content. The last part <>> can contain any text such as <BindingType>> which can be helpful when having multiple nested bindings.

To help condense the bindings, you can create a section in the notes for abbreviated variables.

#-- DocuMotor-Binding-Variables --# 
V1: <<Visible:someLongJsonPathForShowingField>
F1: <<Field:someLongJsonPathForInsertingText>>
#-- DocuMotor-Binding-Variables-End --# 

In the text we will then use the variables like this: <<V1><<F1>><>>

Field

Inserts the value of the received path into the slide.
<<Field:TextPath>>

Parameters

  • TextPath
    JSON path to the value to Insert.

Hyperlink

Adds or replaces a link to the shape of the binding.

List

Repeats the content within the binding for each element in the received array. The element is used as the input data for the duplicated content.
<<List:ArrayPath>..<List:ArrayPath>>

Parameters

  • ArrayPath
    JSON path to the array that the list will iterate

Reference

The reference binding adds a link to the wrapped content. The link targets the slide which is registered with the same value as the parameter of the binding. To register a slide, add the following to the notes of the slide:

#-- DocuMotor-References --#
NoteReferencePath1
NoteReferencePath2
#-- DocuMotor-References-End --#

Each ReferencePath in the notes should be separated with linebreak.
<<Reference:ReferencePath>...<>>

Parameters

  • ReferencePath
    JSON path used in the binding. The value in the JSON is used for the slide. The wrapped content will link to the slide which has been tagged with the same value.
  • NoteReferencePath
    JSON path used to tag the slide. Like with ReferencePath, the value of the JSON is used to tag the slide.

RichHtmlText

Inserts text formatted using HTML into the slide. The HTML doesn’t need to be a full document, but paragraphs does need to be tagged. The string This is a text with <b>bold</b> text. Is not a valid format, but <p>This is a text with <b>bold</b> text.</p> is valid.

It is possible to define a user style through a JSON in the alt text of the text box. The JSON is removed in the generated presentation.
<<RichHtmlText:HtmlPath>>

Parameters

  • HtmlPath
    JSON path of the HTML document to insert into the slide.

Supported HTML tags

  • <b>
  • <br/>
  • <font face=”” size=”” color=””>
    • Face
      Optional attribute, name of the font family
    • Size
      Optional attribute, size of the font, integer from 1 to 7, 3 being the normal size
    • Color
      Optional attribute, color of the text. Can be a name, e.g:, ‘Red’, hex value, or RGB format, e.g., ‘rgb(255,0,0)’.
  • <h1>
  • <h2>
  • <h3>
  • <h4>
  • <h5>
  • <h6>
  • <i>
  • <li>
  • <ol start=””>
    • Start
      Optional attribute, the value of the first list item in the list
  • <p>
  • <sub>
  • <sup>
  • <u>

User Style

It is possible to overwrite how tags change the style of a paragraph and introduce new inline tags. Inline tags are tags used within a paragraph, such as <b>. All style properties that can be set is listed below in the Style Properties section. The following user style makes the bold tag also add underscore.

{ “b”: 
  { “underscore”: true }
}

The type <Integer, String> is a dictionary with Integer as key and String as value. It is used when mapping the level of a list to a specific style or string/symbol. The level of a list starts at 0, with no indent. The following user style sets the style of a numbered list to use Arabic numbers at no indent, Roman numbers at one indent, and alphabetic letters at two indents.

{ “ol”: 
  { “bulletStyle”: 
    { 
      “0”: “1.”, 
      “1”: ”i.”,
      “2”: “a.” 
    } 
  }
}

Style Properties

The following properties can be used to override HTML styling.

  • Alignment
    • L
      Left
    • Ctr
      Center
    • R
      Right
  • BackgroundColor, string
    The color behind the text, same format as TextColor
  • BaseLine, number
    Moves text down if negative, and up if positive. Default for Subscript and Superscript is -25000 and 30000 respectively.
  • Bold, boolean
    Makes text bold if true
  • BulletChar, <integer, string>
    A mapping of numbered list level, and what string to use as the bullet
  • BulletStyle, <integer, string>
    A mapping of numbered list level and what style to use for bullets. The following types of bullets are supported:
    • l.
    • l)
    • i.
    • i)
    • I.
    • I)
    • a.
    • a)
    • A.
    • A)
  • DefaultFontSize, decimal number
    The size of the text at a factor of 1. Usually only set in the body, and then the factor is used in the remaining tags, but it is not a requirement.
  • Font, text
    Name of the font to use. Write it as displayed in PowerPoint.
  • FontSizeFactor, decimal number
    The size of the text in a tag is by default some % of the default font size. A factor of 1 means that size is unchanged.
  • Indent, number
    Adds a margin to the left side of the first line of a paragraph.
  • IsNumbered, Boolean
    Marks paragraph as a numbered list item.
  • Italic, Boolean
    Makes text italic if true.
  • LineSpace, decimal number
    Multiplier of line space in a paragraph. So, 2 is 200% and 1.5 is 150%.
  • MarginLeft, number
    Adds a margin to the left side of the entire paragraph.
  • NumberStart, number
    The number of the first list item in a numbered list.
  • ShowBullet, Boolean
    Marks paragraph as a bullet list item.
  • SpaceAfter, decimal number
    Points of empty space to add after a paragraph.
  • SpaceBefore, decimal number
    Points of empty space to add before a paragraph.
  • TextColor, text
    The color of the text. Can either use a name ‘red’, Hex value ‘#ff0000’, or rgb format ‘rgb(255,0,0)’.
  • Underscore, Boolean
    Adds a single line of underscore to the text if true.

SlideInfo

Inserts information about the slide on the slide.
<<SlideInfo:SlideInfoType>>

Parameters

  • SlideInfo, value
    • Index
      Inserts index of the slide.

TextColor

Changes the text color of all text elements within the binding scope.
<<TextColor:ColorPath>..<TextColor:ColorPath>>

Parameters

  • ColorPath, string
    JSON path to the color to insert. The color is represented as RGB: “255,0,0”.

TextHyperlink

Used to change a link inside of a text body. There must be a link inside of the binding for it to work and if there are multiple links, only the first one will be changed.
<<TextHyperlink:UrlPath>...<TextHyperlink>>

Parameters

  • UrlPath, string
    JSON path to the URL to insert.

Visible

Will show the content of the binding if the received JSON path is valid, see Truthy values. Otherwise the content is removed.
<<Visible:TestPath>..<Visible>>

Parameters

  • TestPath, string
    JSON path to validate