如何在 Google Drive 中编辑 HTML?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22528933/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:18:17  来源:igfitidea点击:

How to edit HTML in Google Drive?

htmlgoogle-drive-api

提问by user3049027

I have hosted a HTML file created on my PC (along with a stylesheet) on Google Drive using the script described here.

我使用此处描述的脚本在 Google Drive 上托管了在我的 PC 上创建的 HTML 文件(连同样式表)。

I have given out the link and it seems to be working fine (no reported issues from those I've sent it to).

我已经给出了链接,它似乎工作正常(我发送给它的人没有报告问题)。

I have just discovered a minor omission from the file, I need to add another sentence. This should be ridiculously easy on a PC, I could just open it on notepad!

我刚刚发现文件中有一个小遗漏,我需要再补充一句。这在 PC 上应该非常简单,我可以在记事本上打开它!

I can't find a way to edit it on Google Drive, the only connected apps are the viewer and Docs.

我找不到在 Google Drive 上编辑它的方法,唯一连接的应用程序是查看器和文档。

The viewer, as the name suggests, will only let me view the HTML, and the docs app won't let me save it back to the original file.

顾名思义,查看器只会让我查看 HTML,而 docs 应用程序不会让我将其保存回原始文件。

Obviously I could download it then upload again, but from experience it will probably give me a different URL.

显然我可以下载它然后再次上传,但根据经验,它可能会给我一个不同的 URL。

Is there any way for me to do this while keeping the link the same, as I have already given the address out?

有什么办法可以让我在保持链接不变的情况下做到这一点,因为我已经给出了地址?

回答by Alexander

Currently you can't. You can only preview html files, that is preview the code or preview the rendered content, but you cannot natively edit the code. You have two options:

目前你不能。您只能预览 html 文件,即预览代码或预览渲染的内容,但您不能对代码进行原生编辑。您有两个选择:

回答by Wael Showair

回答by user3663067

You can do this through file revisions. Hopefully, Google adds another way, but using the revision feature works for me. To revise your file, click the check mark in the Google Drive file list, click more, and then click "Manage revisions...". In the box that pops up, click upload new revision and then you're set.

您可以通过文件修订来做到这一点。希望谷歌添加另一种方式,但使用修订功能对我有用。要修改您的文件,请单击 Google Drive 文件列表中的复选标记,单击更多,然后单击“管理修订...”。在弹出的框中,点击上传新修订,然后你就设置好了。

You may also be able to edit html files stored in google drive through other plugins, but I do not use any at this time to know of them.

您也许还可以通过其他插件编辑存储在 google drive 中的 html 文件,但我目前不使用任何插件来了解它们。

回答by ricx

Update!

更新!

go to drive right click your html file choose "open with" then "connect more apps" when app library pop up search for "notepad" then choose "drivenotepad" after it connect to drive, select it, you will get code editor.

转到驱动器右键单击您的html文件选择“打开方式”然后“连接更多应用程序”,当应用程序库弹出搜索“记事本”然后连接到驱动器后选择“drivenotepad”,选择它,您将获得代码编辑器。