I want to use the htmlbody of a google sites page as a template for an email template, but I can't get it to find and replace -


i have been successful finding , replacing using document template, , can unmodified html email, no luck in being able find , replace content. should it, right? (i tried replacetext too, assume document thing)) don't error message or anything, script continues on next steps, don't replacement.

var site = sitesapp.getpagebyurl(pageurl); var body = site.gethtmlcontent(); body.replace("{%organization%}", "organization") 

thanks (the thing replaced (in case {%organization%} within table on site if matters)

try following line:

body = body.replace("{%organization%}", "organization"); 

the string replace function not alter original string. instead, returns new string value. code above assign new value original body variable.

for more information see link.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -