Slide bindings
Bindings that are placed directly into the text of a slide
Slide bindings usually insert or modify a piece of text, and are therefore are placed directly where the content should be inserted, or around the content that should be modified.
List of slide bindings
Here's a complete list of bindings that can be placed directly into the slide.
Slide binding | Description |
---|---|
Field | Insert text. |
List | Display contents of an array as an inline or bulleted list. |
Reference | Add a reference to another part of the presentation. |
RichHtmlText | Insert html-formatted text into a document. |
RowRepeat | Repeat rows in a table based on available data. |
SlideInfo | Display slide info. |
TextColor | Change the text color. |
TextHyperlink | Add a hyperlink to a portion of text. |
Visible | Toggle the visibility of a portion of text. |
The slide bindings can also be placed into the Notes pane, with the same syntax.
Abbreviated bindings
When bindings get long and perhaps need to be used multiple places, or you simply want a cleaner look, you can define variables as abbreviations of bindings in the notes of the slide. For example, you can add the following into the notes:
The first and last line are necessary for Documotor to parse the abbreviations. You can then use variables instead of bindings in text like this:
<<V1><<F1>><>>
.Field
<<Field:TextPath>>
.Insert the value of the received path into the slide.
Parameters
JSON path TextPath
A path to the value to insert.
List
<<List:ArrayPath>..<List>>
Repeat the content within the binding once for each element in the argument array. The element is used as the input data for the duplicated content.
Parameters
JSON path ArrayPath
A path to the array to iterate over.
Examples
The placement of the left and right bounds of the binding affects the output. Here is a couple of examples:
Reference
<<Reference:ReferencePath>...<Reference>>
Add a link to a different slide. To be able to reference a slide, you must first register it. To register a slide, add the following to the notes of the slide:
#-- Documotor-References --#
NoteReferencePath
NoteReferencePath2
#-- Documotor-References-End --#
Each ReferencePath
in the notes needs to be separated with a line break.
Parameters
JSON path NoteReferencePath
A path leading to the name that will be used as a reference to the slide.
JSON path ReferencePath
A path leading to the slide reference, which will link to the slide which has been tagged with the same value.
RichHtmlText
<<RichHtmlText:HtmlPath>>
.Insert html-formatted text into the document. The html doesnβt need to be a full document, but the paragraphs do need to be tagged. For example, 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.
The binding replaces the paragraph that it's placed in. This is to ensure that no paragraph is placed within another paragraph, which is not allowed neither in HTML nor in PowerPoint and would result in a corrupted document.
Parameters
JSON path HtmlPath
A path to the HTML document to insert into the slide.
Remarks
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. Read HTML text formatting for complete lists of supported user styles and HTML tags in Documotor, as well as examples.
RowRepeat
<<RowRepeat:$arrayPath>...<RowRepeat>>
Replicate rows in a table once for each element of $arrayPath
. The scope in the nth row is set to the nth element of the array. Similar to the repeat binding in Word.
Parameters
$arrayPath
The path to the array that defines the number of rows and the scope for each row.
SlideInfo
<<SlideInfo:SlideInfoType>>
.Insert information about the slide. Currently, the only info that's supported is inserting slide numbers.
Parameters
string SlideInfoType
Currently, must be equal to Index
, to show slide numbers.
TextColor
<<TextColor:ColorPath>..<TextColor>>
Set text color within the binding scope.
Parameters
JSON path ColorPath
A path to a key whose value is a string with RGB format, e.g., "255,0,0"
.
TextHyperlink
<<TextHyperlink:UrlPath>...<TextHyperlink>>
When the binding surrounds a link in the text, changes the link to the one specified in UrlPath
. If there are multiple links, only the first one will be changed.
Parameters
JSON path UrlPath
A path to the URL string to insert.
Visible
<<Visible:TestPath>..<Visible>>
Shows the content inside the binding if TestPath
evaluates to true
, otherwise the content is removed.
Parameters
JSON path TestPath
A path to the value to be evaluated.
Updated 3 months ago