POST
How to use Google Docs as a Markdown editor with no plugins or Chrome extensions
Author: Alan Richardson
I want to collaborate with people on Markdown based writing. Google Docs is a great collaborative writing environment. But it keeps adding formatting when I don’t want it to, so how can I use it to edit markdown. In this post I will tell you how to do that.
Cutting to the chase: type in your markdown and press ctrl+z
everytime Google Doc adds formatting, save as .txt
Markdown is a text based writing markup language, which you feed into other programs to convert to pdf, html, slides, etc.
I use it all the time. Running the Markdown through Marp to create slides, Dillinger.io for adhoc documents, and Pandoc for more formal documents.
I mainly use a subset of markdown.
When I am creating slides I only really use the following constructs
<!--
This is a comment and not displayed.
-->
# Heading 1
## Heading 2
### Heading 3
* bulleted list item 1
* bulleted list item 2
---
# Three lines above is a slide break
[Visit Talotics.com](https://talotics.com)
![](/images/thisisapng.png)
---
# Last Slide
**Bold Text**
_Italics Text_
Google Docs Does Not Support Markdown
If Google docs can allow me to create the above then I would be fine.
There are Chrome plugins that claim to help with this. But I really want a no-addon approach.
What are the Google Docs Output options?
The following options look most promising.
Web Page (.html, zipped)
Plain text (.txt)
What happens if I create a doc and export as html?
I created a Google Doc - formatted as though it was the Markdown rendering.
I exported the .html
as a zip from Google Docs.
I tried to use online services to convert HTML to Markdown.
It didn’t completely work.
- Dillinger.io
- links are Googlised
- bold and italics are missing
- no image marker
Bonus: I learned that a horizontal line is also ***
and not just ---
What happens if I create a doc and export as text?
Using the same Google Doc, I tried to export as text.
What works?
- horizontal lines
- links that are .com
- bulleted lists
Nothing else.
It can be done - copy and paste from another editor
But that defeats the point
Type it in as Markdown and save as .txt
The biggest pain of using Google Docs as a Markdown editor is the continual reformatting of what you type into formatted text. But if you get used to typing ctrl+z
every time this happens then you will be fine. I experience a similar problem when I type Markdown directly into Evernote, although it doesn’t reformat the text quite as much.
-
headings types fine
- bullets auto convert into bullets
- this exports OK
- or
ctrl+z
to remove formatting
- images you will have to export as html
- save as zipped html and find the images
- publish as html and save the images
- bold works fine
- underscore works fine
- end comments converts into a unicode graphic -
cntrl+z
fixes it
Save as .txt
.
How to check?
- Paste the contents of
.txt
into Dillinger.io. - Open the
.txt
file into Dillinger.io. - Open the
.txt
file in Marp
Since I’m collaborating on a set of slides. Opening in Marp is my preferred option since I can see the actual slides generated.
It is Possible to use Google Docs as a Markdown editor
It is possible to use Google Docs as a markdown editor, just remember to use ctrl+z
a lot.
I’m collaborating with someone who does not really know Markdown. So at the start of our shared Google Doc I have a comment which has these instructions in it.
You just have to take a little care. And since you get to edit as you share. That’s a price that seems fair.