google-docs

Showing document from Google Docs in a WebView

穿精又带淫゛_ 提交于 2019-12-04 02:43:21
Problem with showing google docs in WebView (Android) this is my code mWebView=(WebView)findViewById(R.id.web); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl("https://docs.google.com/viewer?url="+ "https://docs.google.com/file/d/0B7pKTkDz8c3gWGNRTWJidTBTVmc/edit?usp=sharing"); when i click here my android shows options to open the link (like Browser, Chrome, Drive, Internet) and opens the link well in popup Browser! How To Force Android WebView to Process Redirects Google is redirecting you to another URL, and the WebView is allowing the OS to process the redirect. Use

How to get Google docs last edit date

家住魔仙堡 提交于 2019-12-04 02:05:20
I am working on an app in which I need to show the date when google doc was last edited. Snapshot Here I am able to get last modified date through Drive api But it is different from last edited date for cases when file's metadata (e.g. permission) has changed and content hasn't. Is there any way to get date when google doc was last edited? In Google Apps Script there is a DriveApp service that you can use. Something like this will work: function lastUpdatedOn() { var FILE_ID = 'FILEID'; return DriveApp.getFileById(FILE_ID).getLastUpdated(); } The documentation for that is here: https:/

How to find where user's cursor is in Document-bound script

耗尽温柔 提交于 2019-12-03 21:54:13
I have a google apps script that is container-bound to a Google Document, and invoked from a custom menu. I would like it to be able to act upon the currently selected text, but I have not found a way for the script to know what text is selected. My hope is that I could make this code work. The addMyLink() function will attach a custom url (based on some baseUrl ) to the selected text. function onOpen() { DocumentApp.getUi().createMenu('Linker') .addItem('Add awesome link', 'addMyLink') .addToUi(); } function addMyLink(event) { var doc = DocumentApp.getActiveDocument(); var currElement = event

Thumbnail link of a google doc doesn't work

浪尽此生 提交于 2019-12-03 21:20:22
I had done a java code to get the thumbnail link to the image of a google document file.getThumbnailLink() this code was working until the last thursday or friday, and now doesn't work... the result i'm getting is a message "Not Found Error 404" for the url: " https://docs.google.com/a/se.pe/feeds/vt?gd=true&id=1dDEYCOQTlpSy5izlcNz0dAq12ooD3cB5Gdqc1Wd4VV4&v=1&s=AMedNnoAAAAAUq9UYeDxDIprZfC2V8RnJd4gxWeVaXLw&sz=s220 ". I think google has changed the format of this url, for example in the drive.google.com interface for the same thumbnail image I see: https://lh3.google.com

How to copy one or more existing pages of a document using google apps script

可紊 提交于 2019-12-03 20:40:39
I have sucessfully written a small script, which creates a serial letter (physical letter to several recipients) based on data in a Google spreadsheet creating a new document for each letter/addresse. It works, but for large mailings this approach is a bit cumbersome as a large amount of documents are created and need to be printed individually. Now i would like to do the same but as a result having all of the letters in one single Google document. Is there any way to copy the content of an existing document and inserting it a number of times into the same or any other documents (i.e. copy

Open local PDF file in WebView using Google Docs

*爱你&永不变心* 提交于 2019-12-03 15:32:19
There are a million similar questions/answers, all addressing how to open a remote PDF file using Google Docs + webview. None address how to open a local PDF file. Given these strings: String remotePath = "https://myserver.com/data/files/organization/4/pdf/kalinka1369-1374847709-55.pdf"; String localPath = "file:///storage/emulated/0/Droid Noid/com.story.chapters/kalinka1369-1374847709-55.pdf"; String googleDocsURL = "https://docs.google.com/gview?embedded=true&url="; This works: webview.loadUrl(googleDocsURL + remotePath); Whereas this does not: webview.loadUrl(googleDocsURL + localPath); I

Is it possible to modify the Google Docs/Sheets right-click context menu?

岁酱吖の 提交于 2019-12-03 12:57:48
It's well known on how to make a custom upper menu item ( https://developers.google.com/apps-script/guides/menus ), but can you append a function to the context menu when right clicking a cell or item? No. Can't do it. There is no class or method to modify the right click context menu. 来源: https://stackoverflow.com/questions/27932041/is-it-possible-to-modify-the-google-docs-sheets-right-click-context-menu

Force iFrame links (in embedded Google Doc) to open in new window

。_饼干妹妹 提交于 2019-12-03 12:19:18
Very oddly, there seems to be no way of setting Google Document links to open in a new window. (target="_blank"). When publishing a Google Doc and using the embed functionality, an iframe snippet is generated: <iframe src="https://docs.google.com/document/pub?id=1mfSz_3cWh6eW-X3EhQTtCoZ33Km131An8Kyvmuxi5oM&embedded=true"></iframe> All links in the document will be opened within the iFrame and redirected via google's redirect service: http://www.google.com/url?q= Is there any way I can make these links open in a new window? I know there might be cross-frame scripting issues so it's strange

How to force newlines in Google Apps jsdoc descriptions

喜你入骨 提交于 2019-12-03 11:58:36
I can't figure out how in a Google Apps Script to display this correctly. I need it to display new lines in the jsdoc output(e.g. when the function tooltip window comes up in a Spreadheet functions.) I have tried html like however it is just rendered as text and not a line break. For example: /** * Converts the prefixed value to the specified base. * Requires one of the following prefixes: * '0b' Base 2: binary * '0q' Base 4: quaternary * '0o' Base 8: octal * '0x' Base 16: hexadecimal * * @param {string} Value The prefixed value to convert. * @param {number} To The base to convert to. *

Auto height for Iframe containing embedded / published Google Doc

旧街凉风 提交于 2019-12-03 11:34:25
问题 I have an iframe with a published Google Doc. The contents of that doc are subject to change, so I want to auto adjust the height of the iframe based on its content. I found some solutions for this, but they all require access to the head of the child document. Does anyone have an idea on how to do this? You can view an excerpt of the code I use below: #faq{ height: 800px; overflow: hidden; position: relative; width: 660px; border-top: 1px solid #90C547; border-bottom: 1px solid #90C547; }