HTML content in google apps script

陌路散爱 提交于 2019-12-11 13:03:54

问题


how can I modify html code of gogle-site-page that was created with createPageFromTemplate methode?

Look at this:

This is how the page is created:

page.createPageFromTemplate(name,
                            ID,
                            template);

Now i need to add more html content:

var created_page = SitesApp.getPageByUrl(that page);

created_page.setHtmlContent(html code here);

But when I use this setHtmlContent meethode I rewrite the template code. How can I go around this? Is there some way I could just add HTML, not re-write it?

Thank you!


回答1:


doing some string manipulation on a var html = created_page.getHtmlContent() is going to be the idea before setting it again.



来源:https://stackoverflow.com/questions/32110088/html-content-in-google-apps-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!