2021.2

Table Of Contents
Functions and fields
Field Type Description
"html()" on
page1434
Gets or sets the HTML of the body element.
"margins" on
page1463
Margins Allows to set the header and footer of a Master Page, using
a Measurement string, for example: "2in" (this sets a margin
to two inches).
html()
In a Control Script, the html() function of a section or Master Page can be used to get the initial
contents of its <body>, and modify them. This makes it possible, for example, to populate a
section or Master Page with elements retrieved from a Content Management system, before
Standard Scripts run.
html()
Gets the initial contents of the <body> of a section or Master Page.
html(value)
Replaces the contents of the <body> of a section or Master Page with the supplied value. This
function is only available in Control Scripts. See also: "section" on page1454 and
"masterpage" on the previous page.
value
A String that may contain HTML tags.
Examples
The following script uses html() to retrieve the contents of a section and add a paragraph to it.
var foo = merge.context.sections["Section 1"].html();
foo += "<p>hello world</p>";
merge.context.sections["Section 1"].html( foo );
Page 1410