I have a Google document. When I copy and paste something from my browser to the document, the text with hyperlinks get translated into hyperlinks in the document.
If I am in emacs or vim and copy html code into the document, Google treats it like text. This is a reasonable assumption. However I'm wondering if there's a way to trick Google into thinking that a href tag should be turned into a hyperlink.
Best Answer
There are no tricks, just built-in tools and scripts.
Manual conversion
To turn http://example.com into http://example.com, select it and press Ctrl-K (or right-click and choose Link).
This will be a hassle if you pasted in several dozens of these. Then a script is preferable.
Conversion with a script
I wrote two functions, for two different conversions:
Both are added to the document menu by the onOpen function.
The approach is the same in both cases, the details vary in step 3.
.getElement().asText().getText()