如何使用Google Drive API设计Google文档的样式? [英] How to style a Google Doc using Google Drive API?

查看:135
本文介绍了如何使用Google Drive API设计Google文档的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有一个基本上包含在一个简单的表单中的Web应用程序。提交此表单时,我生成了一份发送给Google云端硬盘的文档。它的工作原理。



我的问题是我没有造型,我想知道我该怎么做?我尝试过使用HTML和CSS,但如果HTML允许我构造文档,那么CSS不会执行任何操作。



那么,我该怎么做?

解决方案

我想你正在上传一个带有convert = true的HTML文件来创建Google文档。任何附加的CSS文件将被忽略。有一些嵌入式元素样式将被转换过程所尊重。也许最好的方法是手动创建一个样式文档,然后将其导出为HTML,以查看样式的工作方式。


Currently, I have a web application that basically consists in a simple form. When I submit this form, I generate a document that I send to Google Drive. It works.

My problem is that I have no styling and I wonder how I can do that? I tried with HTML and CSS but if the HTML allows me to structure my document, the CSS does nothing.

So, how could I do that?

解决方案

I guess you're uploading an HTML file, with convert=true, to create a Google Doc. Any "attached" CSS file will be ignored. There is some embedded element styling that will be honoured by the conversion process. Perhaps the best approach would be to create a sample styled document manually, then export it as HTML to see how the styling works.

这篇关于如何使用Google Drive API设计Google文档的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆