2022.2

Table Of Contents
tenteditableattributeontheArticleelementofthesharedcontenttotrueorfalse.This
overridesthemenusetting.
Note: RemotesnippetsinsertedassharedcontentcannotbechangedfromwithintheDesigner.
Ofcourse,theirsourcefilecanbeeditedoutsideoftheDesigner.Whenthathappens,the
changeswillbecomevisibleinremotesnippetsthatareinsertedassharedcontent.
Renamingasnippet
Torenameasnippet,right-clickitontheResourcespaneintheSnippetsfolderandselectRename.
Ifyourenameasnippetthatwasinsertedintoasectionassharedcontent,youneedtoupdatetheref-
erencetothesnippetmanually:
1. Openthesectioninwhichthesnippetisused.
2. SwitchtoSourceview.
3. Lookforthe<article>elementintheHTMLandreplacetheoldsnippetnamewiththenewname
inthesourceattribute.
Translatingasnippet
Snippetsinamultilingualtemplategettranslatedatthemomenttheyareinsertedintheoutput,ifthe
textistaggedfortranslation.Formoreinformationsee"Translatingtemplates"onpage415and"Tag-
gingtextinsnippets"onpage419.
JSON snippets
JSONsnippetsaresnippetsthatcontainJSON datainsteadoftext.Justlikeothertypesofsnippets,
JSONsnippetsarestoredintheSnippetsfolderontheResourcespane,buttheirfilenameendsin
.json.
ThistopiccontainsinformationthatonlyappliestoJSONsnippets.Ifyouwanttoknowhowtoaddan
existing(remote)snippettotheresources,orhowtocreateanemptyJSONsnippet,pleasesee"Snip-
pets"onpage250.
Tip: ItispossibletoopenandeditanyexternalJSONfileintheDesigner:selectFile > Open,
selectAll files (*.*)asthefiletypeandthenselectanHTMLorJSONfile.
UsingaJSONsnippet
UnlikeHTMLsnippets,JSONSnippetscannotbeinsertedintothecontentdirectly,buttheycanbe
accessedviaascriptusingtheloadjson()function.
ToloadaJSONsnippetinscript,use:loadjson(‘snippets/nameofthesnippet.json’).
Forexample:
Page 254