Skip to main content

Blog Post

Moving Content From the Bear App (macOS) Into Google Docs

by Damien McKenna
October 25, 2018

I've gotten to quite like the Bear notes tool on my Mac, it works really simply and uses Markdown for formatting. I also have the need to share documents via Google Docs for work. A problem often comes up quite often - how do I get content from Bear into Google Docs? It turns out to be relatively easy.

Step 1: Find a way to preview Markdown files

A key part of this workflow revolves around previewing the Markdown content that Bear works with, in effect viewing the Markdown content as HTML. The Bear program can export files as HTML, but for this I don't want to specifically save a new file, I just want to temporarily display it.

It turns out that my text editor of choice for the past twelve years, Textmate, includes an option to preview Markdown files. All I have to do is click the tools button, scroll to the Markdown section, and click "Show preview" to see the current window's text rendered through a Markdown parser and displayed through Textmate's internal HTML viewer. Simple.

There are plenty of other Markdown preview tools, but this works well enough for now. And let's be honest – Textmate is always open on my computer.

Step 2: Copy, paste

Now that there's a way of previewing the Markdown text, the next step is to use it.

All that's necessary to get the HTML display of the Bear document is to copy all of the text from the Bear editor; I like keyboard shortcut, so I type command-a to select everything and command-c to copy it into the clipboard. Next off, the clipboard needs to be pasted into a new document in Textmate, so command-n to create a new document and command-v to paste. Once that's in place, go to the gear / tools menu, select the "Markdown" section and click "Show preview" to open the browser preview.

Step 3: Copy, paste

To get the text into Google Docs, simply select all of the text in the browser preview from step 2 (command-a) and copy it into the clipboard (command-c). Then, switch over to the web browser and the Google Docs document the content is going into, and paste the clipboard (command-v).

Step 4: Cleanup

After pasting the HTML into the Google Doc the document will look really messed up. There's a bug in either the rich editor tool that Google Docs uses, or a bug in how Textmate copies to the clipboard, but everything ends up with huge padding between lines. At this point it would be possible to manually fix everything, but that might take an awful lot of time and I'm lazy.

The easy way to fix this is to select all of the pasted text, go to the Format menu in Google Docs, and the click "Clear formatting". The document will instantly be cleaned up so that the headings are the way they're supposed to be, bullets will be indented correctly, everything will be fixed.

Et voila!

Yes, this whole thing is super simple, the trick is knowing the steps.

I hope this helps someone else.

Headshot

Meet team member, Damien McKenna

In his role as Community Lead, Damien directs internal initiatives that strengthen Mediacurrent’s commitment to open-source principles, collaboration, and sharing knowledge to strengthen the Drupal community. Regularly ranked as one of the ten most active contributors on drupal.org, Damien has been a significant member of the Drupal community since 2007. In addition to writing documentation, writing & reviewing patches and mentoring others, Damien maintains Metatag, Views, Twitter, Panelizer and several other SEO-focused modules.

Prior to Mediacurrent, Damien spent five years building content management systems and frameworks using multiple languages (PHP, ColdFusion, Ruby), before he was first introduced to Drupal in 2007. A year later, he delved deeper into Drupal 5's architecture while migrating two popular skiing sites off a proprietary system. While becoming increasingly involved in his local Drupal community, Damien led the development of several successful content-rich platforms including a US radio station network spanning ten individual sites. Damien joined Mediacurrent in 2012 as a Lead Drupal Architect, where he was involved with planning the architecture of new sites, project estimates, and lots of hands-on development work.

When not working with Drupal, Damien enjoys playing ukulele and spending time with family in their home in Central Florida.

Learn more about Damien >

Related Insights