简体   繁体   English

Google Apps脚本中的HTML内容

[英]HTML content in google apps script

how can I modify html code of gogle-site-page that was created with createPageFromTemplate methode? 如何修改用createPageFromTemplate方法创建的gogle-site-page的html代码?

Look at this: 看这个:

This is how the page is created: 这是创建页面的方式:

page.createPageFromTemplate(name,
                            ID,
                            template);

Now i need to add more html content: 现在,我需要添加更多的html内容:

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. 但是,当我使用此setHtmlContent methode时,我重写了模板代码。 How can I go around this? 我该如何解决? Is there some way I could just add HTML, not re-write it? 有什么办法可以添加HTML而不重写HTML?

Thank you! 谢谢!

var html = created_page.getHtmlContent()上进行一些字符串操作将是重新设置之前的想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM