2022.2

Table Of Contents
Note: ThesedateandtimepatternlettersandpatternsconformtostandardJavanotation.For
moreinformation,seehttp://-
docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html.
loadhtml()
LoadsHTMLcontentfromthespecifiedHTMLfile.Thefilemaybelocatedinsidethetemplate(see
"Snippets"onpage661)orhostedonaContentManagementSystemoronanotherlocationoutside
thetemplate.
Anoptionalselectorallowsyoutoretrieveonlythecontentofmatchingelements.
Note:
l
ThespecifiedHTMLfileisexpectedtobeUTF-8encoded.
l
Loadhtml()iscachedperbatchrun(basedontheURL)inprint/email.
Tip: ToloadaJavaScriptfile(.js)orastylesheet(.css)youcanuseloadtext().See"loadtext
()"onpage1186.
Tip: Externalcontentisnotloadedwhileeditingascript.Totestascriptthatloadsexternalcon-
tent,youcandoapreflight;see"DoingaPreflight"onpage818.
loadhtml(location)
LoadsallHTMLfromthespecifiedHTMLfile.
location
Stringcontainingapaththatcanbeabsoluteorrelativetothesection/context.
Usesnippets/<snippet-name>toretrievethecontentfromanHTMLfileresidingintheSnippets
folderontheResourcespanel.
Inordertoretrievefilesfromoutsidethetemplatethefileprotocolissupportedaswellasthe
http/httpsprotocols.
ThecompletesyntaxofafullyqualifiedURLwiththe"file"protocolis:file://<host>/<path>.Ifthehostis
"localhost",itcanbeomitted,resultinginfile:///<path>,forexample:file:///c:/-
somefolder/somecontent.html.
Whenusingthehttp/httpsprotocol,rememberthatonlyabsolutepathsaresupportedinsideremote
snippets(see"Remotesnippets"onpage662).
Tip: ToquicklygetthelocationofanHTMLsnippetinthetemplateresources,right-clickthesnip-
petintheResourcespaneandselectCopy Resource Location.
Page 1182