{"id":1478,"date":"2022-02-16T08:59:21","date_gmt":"2022-02-16T08:59:21","guid":{"rendered":"https:\/\/info.documotor.com\/?page_id=1478"},"modified":"2023-01-12T12:56:30","modified_gmt":"2023-01-12T12:56:30","slug":"slide-bindings","status":"publish","type":"page","link":"https:\/\/info.documotor.com\/?page_id=1478","title":{"rendered":"Slide Bindings"},"content":{"rendered":"\n<p>Slide bindings are written directly in the text and can either be of the format <code>&lt;&lt;BindingType:parameter1$parameter2...&gt;&gt;<\/code> or of the format <code>&lt;&lt;BindingType:parameter1$parameter2...&gt;...&lt;&gt;&gt;<\/code> when the binding needs to wrap around content. The last part <code>&lt;&gt;&gt;<\/code> can contain any text such as <code>&lt;BindingType&gt;&gt;<\/code> which can be helpful when having multiple nested bindings.<\/p>\n\n\n\n<p>To help condense the bindings, you can create a section in the notes for abbreviated variables.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">#-- DocuMotor-Binding-Variables --# \nV1: &lt;&lt;Visible:someLongJsonPathForShowingField&gt;\nF1: &lt;&lt;Field:someLongJsonPathForInsertingText&gt;&gt;\n#-- DocuMotor-Binding-Variables-End --# <\/code><\/pre>\n\n\n\n<p>In the text we will then use the variables like this: <code>&lt;&lt;V1&gt;&lt;&lt;F1&gt;&gt;&lt;&gt;&gt;<\/code><\/p>\n\n\n\n<h2>Field<\/h2>\n\n\n\n<p>Inserts the value of the received path into the slide.<br><code>&lt;&lt;Field:TextPath&gt;&gt;<\/code><\/p>\n\n\n\n<h4>Parameters<\/h4>\n\n\n\n<ul><li><strong>TextPath<\/strong><br>JSON path to the value to Insert.<\/li><\/ul>\n\n\n\n<p>Hyperlink<\/p>\n\n\n\n<p> Adds or replaces a link to the shape of the binding.<\/p>\n\n\n\n<h2>List<\/h2>\n\n\n\n<p>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.<br><code>&lt;&lt;List:ArrayPath&gt;..&lt;List:ArrayPath&gt;&gt;<\/code><\/p>\n\n\n\n<h4>Parameters<\/h4>\n\n\n\n<ul><li><strong>ArrayPath<\/strong><br>JSON path to the array that the list will iterate<\/li><\/ul>\n\n\n\n<h2>Reference<\/h2>\n\n\n\n<p>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:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">#-- DocuMotor-References --#\nNoteReferencePath1\nNoteReferencePath2\n#-- DocuMotor-References-End --#<\/code><\/pre>\n\n\n\n<p>Each ReferencePath in the notes should be separated with linebreak.<br><code>&lt;&lt;Reference:ReferencePath&gt;...&lt;&gt;&gt;<\/code><\/p>\n\n\n\n<h3>Parameters<\/h3>\n\n\n\n<ul><li><strong>ReferencePath<\/strong><br>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. <\/li><li><strong>NoteReferencePath<\/strong><br>JSON path used to tag the slide. Like with ReferencePath, the value of the JSON is used to tag the slide.<\/li><\/ul>\n\n\n\n<h2>RichHtmlText<\/h2>\n\n\n\n<p>Inserts text formatted using HTML into the slide. The HTML doesn\u2019t need to be a full document, but paragraphs does need to be tagged. The string <code>This is a text with &lt;b&gt;bold&lt;\/b&gt; text.<\/code> Is not a valid format, but <code>&lt;p&gt;This is a text with &lt;b&gt;bold&lt;\/b&gt; text.&lt;\/p&gt;<\/code> is valid.<br><br>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.<br><code>&lt;&lt;RichHtmlText:HtmlPath&gt;&gt;<\/code><\/p>\n\n\n\n<h3>Parameters<\/h3>\n\n\n\n<ul><li>HtmlPath<br>JSON path of the HTML document to insert into the slide.<\/li><\/ul>\n\n\n\n<h3>Supported HTML tags<\/h3>\n\n\n\n<ul><li>&lt;b&gt;<\/li><li>&lt;br\/&gt;<\/li><li>&lt;font face=&#8221;&#8221; size=&#8221;&#8221; color=&#8221;&#8221;&gt;<ul><li>Face<br>Optional attribute, name of the font family<\/li><li>Size<br>Optional attribute, size of the font, integer from 1 to 7, 3 being the normal size<\/li><li>Color<br>Optional attribute, color of the text. Can be a name, e.g:, &#8216;Red&#8217;, hex value, or RGB format, e.g., &#8216;rgb(255,0,0)&#8217;.<\/li><\/ul><\/li><li>&lt;h1&gt;<\/li><li>&lt;h2&gt;<\/li><li>&lt;h3&gt;<\/li><li>&lt;h4&gt;<\/li><li>&lt;h5&gt;<\/li><li>&lt;h6&gt;<\/li><li>&lt;i&gt;<\/li><li>&lt;li&gt;<\/li><li>&lt;ol start=&#8221;&#8221;&gt;<ul><li>Start<br>Optional attribute, the value of the first list item in the list<\/li><\/ul><\/li><li>&lt;p&gt;<\/li><li>&lt;sub&gt;<\/li><li>&lt;sup&gt;<\/li><li>&lt;u&gt;<\/li><\/ul>\n\n\n\n<h3>User Style<\/h3>\n\n\n\n<p>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 &lt;b&gt;. 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.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{ \u201cb\u201d: \n  { \u201cunderscore\u201d: true }\n}<\/code><\/pre>\n\n\n\n<p>The type &lt;Integer, String&gt; 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.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{ \u201col\u201d: \n  { \u201cbulletStyle\u201d: \n    { \n      \u201c0\u201d: \u201c1.\u201d, \n      \u201c1\u201d: \u201di.\u201d,\n      \u201c2\u201d: \u201ca.\u201d \n    } \n  }\n}<\/code><\/pre>\n\n\n\n<h4>Style Properties<\/h4>\n\n\n\n<p>The following properties can be used to override HTML styling.<\/p>\n\n\n\n<ul><li><strong>Alignment<\/strong><ul><li><strong>L<\/strong><br>Left<\/li><li><strong>Ctr<\/strong><br>Center<\/li><li><strong>R<br><\/strong>Right<\/li><\/ul><\/li><li><strong>BackgroundColor<\/strong>, string<br>The color behind the text, same format as TextColor<\/li><li><strong>BaseLine<\/strong>,<strong> <\/strong>number<br>Moves text down if negative, and up if positive. Default for Subscript and Superscript is -25000 and 30000 respectively.<\/li><li><strong>Bold<\/strong>, boolean<br>Makes text bold if true<\/li><li><strong>BulletChar<\/strong>, &lt;integer, string&gt;<br>A mapping of numbered list level, and what string to use as the bullet<\/li><li><strong>BulletStyle<\/strong>, &lt;integer, string&gt;<br>A mapping of numbered list level and what style to use for bullets. The following types of bullets are supported:<ul><li><strong>l.<\/strong><\/li><li><strong>l)<\/strong><\/li><li><strong>i.<\/strong><\/li><li><strong>i)<\/strong><\/li><li><strong>I.<\/strong><\/li><li><strong>I)<\/strong><\/li><li><strong>a.<\/strong><\/li><li><strong>a)<\/strong><\/li><li><strong>A.<\/strong><\/li><li><strong>A)<\/strong><\/li><\/ul><\/li><li><strong>DefaultFontSize<\/strong>, decimal number<br>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.<\/li><li><strong>Font<\/strong>, text<br>Name of the font to use. Write it as displayed in PowerPoint.<\/li><li><strong>FontSizeFactor<\/strong>, decimal number<br>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.<\/li><li><strong>Indent<\/strong>, number<br>Adds a margin to the left side of the first line of a paragraph.<\/li><li><strong>IsNumbered<\/strong>, Boolean<br>Marks paragraph as a numbered list item.<\/li><li><strong>Italic<\/strong>, Boolean<br>Makes text italic if true.<\/li><li><strong>LineSpace<\/strong>, decimal number<br>Multiplier of line space in a paragraph. So, 2 is 200% and 1.5 is 150%.<\/li><li><strong>MarginLeft<\/strong>, number<br>Adds a margin to the left side of the entire paragraph.<\/li><li><strong>NumberStart<\/strong>, number<br>The number of the first list item in a numbered list.<\/li><li><strong>ShowBullet<\/strong>, Boolean<br>Marks paragraph as a bullet list item.<\/li><li><strong>SpaceAfter<\/strong>, decimal number<br>Points of empty space to add after a paragraph.<\/li><li><strong>SpaceBefore<\/strong>, decimal number<br>Points of empty space to add before a paragraph.<\/li><li><strong>TextColor<\/strong>, text<br>The color of the text. Can either use a name &#8216;red&#8217;, Hex value &#8216;#ff0000&#8217;, or rgb format &#8216;rgb(255,0,0)&#8217;.<\/li><li><strong>Underscore<\/strong>, Boolean<br>Adds a single line of underscore to the text if true.<\/li><\/ul>\n\n\n\n<h2>SlideInfo<\/h2>\n\n\n\n<p>Inserts information about the slide on the slide.<br><code>&lt;&lt;SlideInfo:SlideInfoType&gt;&gt;<\/code><\/p>\n\n\n\n<h3>Parameters<\/h3>\n\n\n\n<ul><li><strong>SlideInfo<\/strong>, value<ul><li><strong>Index<\/strong><br>Inserts index of the slide.<\/li><\/ul><\/li><\/ul>\n\n\n\n<h2>TextColor<\/h2>\n\n\n\n<p>Changes the text color of all text elements within the binding scope.<br><code>&lt;&lt;TextColor:ColorPath&gt;..&lt;TextColor:ColorPath&gt;&gt;<\/code><\/p>\n\n\n\n<h4>Parameters<\/h4>\n\n\n\n<ul><li><strong>ColorPath<\/strong>, string<br>JSON path to the color to insert. The color is represented as RGB: &#8220;255,0,0&#8221;.<\/li><\/ul>\n\n\n\n<h2>TextHyperlink<\/h2>\n\n\n\n<p>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.<br><code>&lt;&lt;TextHyperlink:UrlPath&gt;...&lt;TextHyperlink&gt;&gt;<\/code><\/p>\n\n\n\n<h3>Parameters<\/h3>\n\n\n\n<ul><li><strong>UrlPath<\/strong>, string<br>JSON path to the URL to insert.<\/li><\/ul>\n\n\n\n<h2>Visible<\/h2>\n\n\n\n<p>Will show the content of the binding if the received JSON path is valid, see <a href=\"https:\/\/info.documotor.com\/?page_id=644\" data-type=\"page\" data-id=\"644\">Truthy values<\/a>. Otherwise the content is removed.<br><code>&lt;&lt;Visible:TestPath&gt;..&lt;Visible&gt;&gt;<\/code><\/p>\n\n\n\n<h3>Parameters<\/h3>\n\n\n\n<ul><li><strong>TestPath<\/strong>, string<br>JSON path to validate<\/li><\/ul>\n\n\n\n<div class=\"wp-container-1 wp-block-buttons\">\n<div class=\"wp-block-button is-style-outline\"><a class=\"wp-block-button__link\" href=\"https:\/\/info.documotor.com\/documentation\/reference\/powerpoint-template\/shape-bindings\/\">&lt; Previous<\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Slide bindings are written directly in the text and can either be of the format &lt;&lt;BindingType:parameter1$parameter2&#8230;&gt;&gt; or of the format &lt;&lt;BindingType:parameter1$parameter2&#8230;&gt;&#8230;&lt;&gt;&gt; when the binding needs to wrap around content. The last part &lt;&gt;&gt; can contain any text such as &lt;BindingType&gt;&gt; which can be helpful when having multiple nested bindings. To help condense the bindings, you [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":132,"menu_order":-1,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/1478"}],"collection":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1478"}],"version-history":[{"count":17,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/1478\/revisions"}],"predecessor-version":[{"id":4564,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/1478\/revisions\/4564"}],"up":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/132"}],"wp:attachment":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}