I just came upon a Google doc from a high school account that I no longer have access to. I want to copy paste my work, but the copy paste functionality is disabled. I know you could access developer tools such as document.body.innerText
to get a text copy of the doc. I would, however, prefer to have the actual doc and its formatting kept, so I would need a print screen of the entire doc (and then run it by Optical Text Recognition) or just get the copy paste functionality. There is JavaScript blocking the copying functionality, and upon disabling the JavaScript, the page does not load (error). Would anyone be able to help me out, please?
Google Drive – How to Copy from a Protected Google Doc
google docsgoogle-drive
Related Topic
- Google Docs – Cannot Edit Multi-Paragraph Selection in Firefox
- Google-drive – Creating a separate doc from comments in a Google Docs
- Google-docs – change the default Google Docs suggestion mode text format so suggestion text is highlighted yellow
- Google Docs Formatting – Why Did Google Docs Start Consolidating Multiple Newlines into Single Newlines?
- Google-drive – How to keep a copy of a Google Doc even after the owner deletes it
- Google-docs – Google Docs copy paste formatting / indent question
- Stop Google Docs from Pasting Titles Instead of Links
Best Answer
How I found out
Disclaimer: Unless you wanna learn how I found out about this trick, skip to the next section.
I was looking at this StackExchange question for inspiration on how to do such a thing the other day and now I've found out how to do it.
Since the HTML displayed on your browser must contain the raw/unparsed Google Doc, there must be a way to do this.
I started with my investigation by copying the HTML code that is rendered inside the viewing box (the
<div>
shown in the screenshot). Just use Ctrl. + Shift + C and then click on it when the entire editing section is blue.My first thought was to paste it into an HTML page and render it without any of the other CSS stylesheets Google loads. Lots of features are rendered weirdly without any of the stylesheets.
Since that didn't work, my second thought was to paste the exact thing into another Google Doc that you own. Brilliant! Now all the CSS that are needed for rendering the code is already loaded and it saves us a lot of work.
Now, you have the document that you can print, copy, or export/save from!!!
TL;DR (ie. How to do it)
Step 1. Load the Doc
Step 2. Open Inspect Element (Ctrl. + Shift. + I OR just use F12)
Step 3. Click on the button shown in the image below so you can select an element that is displayed (look at the top-left corner of the Inspect Element / Developer Tools)
Step 4. Select the
<div>
tag as shown:Step 5. Look in the Inspect Element toolbar. A
<div>
should be highlighted in blue. Click on it to put it into focus and then copy the element.Step 6. Make a new Doc that you own
Step 7. Repeat steps 2-4 for the new Doc, until you find the
<div>
tag.Step 8. Right click on it, then click edit as HTML. Replace everything in the text box with what you copied from the other Doc.
Step 9. Close out of the Inspect Element. Now, you have a Doc that you own (to save it, make a small edits, and then it will autosave in your Drive)
Possible Errors
If you get this error: