[HN Gopher] Import and Export Markdown in Google Docs
___________________________________________________________________
Import and Export Markdown in Google Docs
Author : pentagrama
Score : 538 points
Date : 2024-07-17 02:44 UTC (20 hours ago)
(HTM) web link (workspaceupdates.googleblog.com)
(TXT) w3m dump (workspaceupdates.googleblog.com)
| tekknolagi wrote:
| I thought copy as MD existed years ago and then went to look for
| it recently and it was gone. Now it's back. Am I losing it?
| cpswan wrote:
| Maybe you've been using the GD2md-html plugin. I've certainly
| found it useful over the years, and will likely still use it
| for some of my workflows.
| https://workspace.google.com/marketplace/app/docs_to_markdow...
| tekknolagi wrote:
| I don't think so... It was part of the download menu for me
| stevemk14ebr wrote:
| There was partial markdown support (and still is) in gDocs
| today. AFAIK copy as MD was never supported. But this new
| feature is full round tripping into and out of gDocs as native
| markdown.
| CityOfThrowaway wrote:
| My guess is that this is strongly motivated by the success of
| LLMs.
|
| The lack of MD support makes manual IO from Docs to your favorite
| LLM lossy (or very annoying). Cool that it's fixed.
| thallavajhula wrote:
| At this point, most major changes could be motivated by
| LLMs/AI.
| staticman2 wrote:
| They also already have to support Gemini to Google Docs and
| vice versa so it makes sense they'd have to support Markdown in
| some fashion on the backend.
| bomewish wrote:
| If this is implemented properly it'll be a game changer for
| collaboration on papers. Means one can write a paper with
| colleagues in markdown and then easily knit with pandoc/quarto.
| Cheaper than overleaf etc.
| gouggoug wrote:
| I'll add that writing a paper might be better handled by a more
| feature-full format like Asciidoc.
| bt1a wrote:
| Why not a markdown doc + git with each colleague using their
| own text editor/IDE of choice?
| KeplerBoy wrote:
| Because not everyone is interested in setting up a
| Pandoc/Latex toolchain. Overleaf almost solved this problem
| but they don't support Pandoc as a frontend and want money
| unless you self-host.
| prmoustache wrote:
| You don't need pandoc and even less a latex(WTF does it
| have to do with md???) toolchain to work with markdown
| documents.
| KeplerBoy wrote:
| Sorry, I was talking about scientific writing, where you
| have to be able to produce PDF artefacts.
|
| Writing in markdown and converting to .tex is actually a
| quite popular way of doing that these days.
| crazygringo wrote:
| Because in my experience, the value of collaboration tools
| isn't versioning -- going back to an older version rarely
| happens.
|
| It's the suggested edits combined with comments sidebar right
| there in the document, where you can have whole back-and-
| forth asynchronous discussions.
|
| There's no obvious/easy way to have comment threads in
| markdown or in git.
|
| And while you could, in theory, implement suggested edits as
| commits on a separate branch waiting to be merged in, the
| workflow for that would be pretty horrible -- are you going
| to create a separate branch and commit for every single edit?
| Since small edits are generally individually accepted,
| rejected, or further modified.
| Symbiote wrote:
| You can already get most of the way there, as Pandoc supports
| reading the ODT or DOCX export from Google Docs reasonably
| well.
|
| I have this in my shell history: pandoc
| --from=docx --to=asciidoc --wrap=none --atx-headers --extract-
| media=img doc.docx > doc.adoc
| chrisfinazzo wrote:
| Stick downdoc on the end of that pipeline and you're done --
| unless you prefer working in AsciiDoc, I guess. Not my thing,
| but you do you...
|
| https://github.com/opendevise/downdoc
| Symbiote wrote:
| Asciidoctor has been much better received by my colleagues,
| primarily for the built-in support of a few technical
| writing features -- admonitions, non-trivial tables,
| crossreferences, etc.
| protortyp wrote:
| I recently used Typst and their own collab solution for a paper
| we worked on. While some features are still lacking it was a
| pretty good experience overall.
| yosito wrote:
| I don't really use Google products, so I find this particularly
| useful for collaborating with people who do. I can do my shit in
| Markdown, they can do their shit in Google, and we can easily
| transfer the content back and forth.
| Freak_NL wrote:
| No support for code blocks still: ```java
| String x = "xxx"; ```
|
| No quoting: The docs for `libfloof` state:
| > The floof is 4 bytes long, at most.
|
| And when I type `code` with backticks at the start of a line, the
| word 'code' is formatted as code as expected, but auto-correct
| automatically capitalises it to 'Code' -- which should never be
| done with code fragments.
|
| So this is basically just headings, italics, bold, and links?
|
| It's really annoying when you need to share technical
| documentation with lots of code and code-like content with people
| and they've started doing the spec in Google Drive. Just give me
| working Markdown.
| ggm wrote:
| We just have to iterate in the "markdown support feedback/help"
| pulldown I guess. because without ```code``` it's not useful.
|
| Looking at you HN... (ok at least we have 2 indents codeblock)
| hnarn wrote:
| What would ``` add that you can't already do with two
| indents?
|
| Beyond that, I think support for ```sh type highlighting
| would be awful, one of the best things about HN is how clean
| it is, I'd hate to see syntax highlighting or pictures or
| whatever when scrolling.
| promiseofbeans wrote:
| It would let you paste a lot of existing markdown into
| google docs
| Freak_NL wrote:
| They meant here on HackerNews. The only thing I really
| miss sometimes is a way to quote without resorting to
| indented code blocks.
|
| > Just a tiny hint that any paragraph like this starting
| with a greater-than sign is a quote.
| codetrotter wrote:
| > What would ``` add that you can't already do with two
| indents?
|
| It would let me add those fences before and after the code
| I'm pasting instead of having to go and add spaces in front
| of every pasted line. On mobile adding the spaces after
| pasting is a bit fiddly. Then again, maybe it is a feature
| because it discourages pasting too many lines of code in
| many cases.
| timClicks wrote:
| To add a code block, type @ and scroll down to "Code Block <>".
| It's still very limited, with syntax highlighting limited to
| C/C++, Java, JavaSript, Python.
| crazygringo wrote:
| Is that available only in certain paid versions of Google
| Workspace, or has it not rolled out to everyone?
|
| When I type @ there's no code block option. I get People,
| Smart Chips, and then in "Building Blocks" I get five items
| from "Meeting Notes" to "Project Assets". If I click the
| arrow to expand to the full list of building blocks, it only
| adds a sixth item "Launch Content Tracker" and the rest is
| blank space.
| judge2020 wrote:
| The author of the feature is another top-level comment and
| said it's still being rolled out over time, so that's
| probably why.
| paulgb wrote:
| It's only available in certain paid versions
| (https://workspaceupdates.googleblog.com/2022/12/format-
| displ...)
|
| Which is too bad, it's the one thing keeping me from
| writing design docs in google docs.
| crazygringo wrote:
| Ah thank you. Too bad.
|
| Funny that they paywalled that feature, while tools like
| Colab are free.
|
| Generally, Google has made code-related and academia-
| related tools freely available. Oh well.
| tomeraberbach wrote:
| Code blocks are a paid feature, but the Markdown
| import/export feature is not paid. It's just still rolling
| out
| underdeserver wrote:
| Worked for me by typing ```<enter>
|
| It opens a block and you can select Java. (There's only a
| relatively small number of syntaxes supported, but still.)
| akersten wrote:
| Also when I close a single line code with `, the formatting
| stays as if I'm writing more code. It should reset to whatever
| formatting was before the opening `
| stevemk14ebr wrote:
| This is supported, but it's probably not rolled out to you yet.
| And once it is rolled out, you need to turn it on yourself. See
| the blog the developer linked to in a comment.
| sgt wrote:
| This is great, the other day I had to export to HTML from Google
| Docs and then import the HTML into some kind of Markdown
| generator. The result was mediocre, but usable.
| eskibars wrote:
| This would have been very useful at several companies I worked at
| as a product manager for release blogs.
|
| I always start editing in gdocs because it's so much easier to
| collaborate on than any blog platform, but then you always need
| to copy/paste the content once final into the blog and nearly
| every time, it copies some elements of formatting into the rich
| HTML editor I don't want (fonts, font sizes, etc) while I do want
| some things (headings, bold, italics). It's usually easy to
| import markdown to blogs or trivial to convert it to stripped-
| down HTML that can be imported. One of the teams I worked on
| built a simple gdoc script to do this
| hu3 wrote:
| Indeed, very useful to unite markdown with the omnipresence of
| gdocs.
|
| One tip for pasting without formating, at least in Windows, is
| CTRL+SHIFT+V.
| gempir wrote:
| Does this just import Markdowns and convert them to Gdoc and then
| you export it finally. Or can you collaborate on Markdowns in
| real time?
|
| Could you build a confluence/wiki like system on top of this?
| red_admiral wrote:
| This is a cool feature, even if parts of markdown still need to
| be implemented (for pedants: commonmark).
|
| Meanwhile, Trello is once again threatening to force everyone
| onto the new rich-text editor and disable the old markdown one.
| dazzaji wrote:
| For Google Docs like real time collab on native markdown, I like
| and use daily:
|
| * https://hackmd.io
|
| and
|
| * https://stash.new
| dotancohen wrote:
| W Google docs Writer Competitors
| mcbetz wrote:
| I used Hackmd in the past to share the draft of my book (1) and
| liked that people don't need to have an account to comment.
| Google Docs was no option as no markdown support and account
| required. The process worked well but I found Hackmd too
| expensive for just getting feedback. Stash looks promising for
| this use case.
|
| (1) Written fully in Markdown in Obsidian at this point. I
| moved to Asciidoc since because of formatting. The early draft
| is still available on Hackmd though. Details in my bio.
| ZeWaka wrote:
| We've used HackMD in my OSS project since Google Docs was
| failing us as far as version control goes. What's great is that
| you can sync a HackMD document to GitHub or similar, so you can
| collaborate on a document and then push it to a repo.
| guytv wrote:
| when did google become sooo sloooow implementing trivial
| features, and then not even shipping a complete set of markdown?!
| EE84M3i wrote:
| > trivial features
|
| Four features were announced:
|
| 1. Convert Markdown to Docs content on paste
|
| 2. Copy Docs content as Markdown
|
| 3. Export a Doc as Markdown (from File > Download)
|
| 4. Import Markdown as a Doc (from File > Open or "Open with
| Google Docs" from Drive)
|
| Which of these do you see as trivial? These all seem quite
| complex to me with many edge cases , incompatibilities and
| ambiguities, especially if there's an expectation that you can
| round trip losslessly.
| guytv wrote:
| All of them. It should have been implemented years ago. Using
| GDocs after using notion for a few weeks feels like going
| back in time.
| Crier1002 wrote:
| i hope they'll eventually support Mermaid
| (https://github.com/mermaid-js/mermaid) for creating diagrams
| directly within documents. i've been using it a lot for my
| markdown files and it works amazingly well with LLMs (e.g. asking
| LLM to generate the diagram representation of something using
| Mermaidjs)
| jfoster wrote:
| Interesting announcement. Feels like some of it is just copy-
| pasted from a PRD. Not necessarily a bad thing (it's clearer than
| press release style), just the first time I've noticed it in a
| "bigtech" announcement.
| worldmerge wrote:
| This is really useful! Hope they continue to add features. I
| don't like directly writing markdown and would rather use a text
| editor like Docs or Word.
| sheremetyev wrote:
| You are not alone :) For Microsoft Word you might find Writage
| plugin useful (https://www.writage.com) - supports all basic
| Markdown syntax, tables etc. and recently added support for
| math formulas.
| orliesaurus wrote:
| I guess most users of Google Docs have no use for this,
| especially the download as markdown. I wonder why they decided to
| add this feature for the tech crowd so late in the lifecycle of
| the product, feels almost like an Summer '24 intern project?
| vitus wrote:
| Agreed; given the timing, an intern project seems plausible.
| (It feels a bit more ambitious than a typical intern project
| though, and I'm not sure how many of those end up quite so
| user-facing.)
|
| I can imagine one internal use case.
|
| At Google, we use Google Docs heavily for design docs. After
| the system has been built, it's not uncommon to link to the
| design doc as supplementary reading material. But the design
| doc isn't intended to co-evolve with the system; at some point,
| we migrate the design details to our internal documentation
| pages (g3doc [0]), which serves version-controlled markdown
| files and often has a much lower barrier to entry.
|
| Even though Google Docs is ostensibly collaborative, design
| docs are often used as a snapshot of an individual's
| engineering maturity as justification during performance
| evaluation and promotion, and so it's not typical for them to
| be updated substantially, years after the initial
| implementation is complete.
|
| [0] We write about it briefly in a case study about "The Google
| Wiki" at https://abseil.io/resources/swe-book/html/ch10.html
| zenbowman wrote:
| 100%. I do this all the time, this will be very useful
| internally.
| remoquete wrote:
| Collaborative editing of Markdown docs in GitHub / GitLab can
| be a pain. This is a huge game changer for technical writers.
| Admittedly not the biggest crowd, but hey...
| crazygringo wrote:
| Speaking as someone with experience in enterprise software, I'd
| say there's a good chance it's because one or more large
| corporations were ready to migrate from MS Office to Google
| Workspace but that not having Markdown import/export would be a
| deal-breaker.
|
| A lot of times when you wonder, "why did they add _that_
| feature? ", that's why. A single large potential customer
| absolutely needed it because of whatever critical internal
| business processes they happen to have.
|
| It's a major difference from software sold to consumers, where
| the aggregate consumer demand for a feature is generally more
| obvious/intuitive/explainable.
| xnx wrote:
| So close. I have always hoped for an edit in markdown (or limited
| formatting) mode.
| sanjeevmsk wrote:
| Moved to self hosted bookstack recently due to this feature
| missing
| d4rkp4ttern wrote:
| I like to have AI auto-complete assistance from something like
| GitHub copilot, so I often compose markdown within PyCharm and
| then paste to Google docs. There seem to be zillions of "AI-
| writing" tools out there but I'm shocked that nothing has
| replaced the smooth functionality of GitHub copilot. Google docs
| with Gemini is not smooth at all. Tried obsidian plugins but they
| are janky.
| tomeraberbach wrote:
| Hey folks, I'm the engineer who implemented the new feature. Just
| clearing up some confusion.
|
| A lot of you are noticing the preexisting automatic detection
| feature from 2022 [1], which I also worked on. That's NOT what
| this newly announced feature is. The new feature supports full
| import/export, but it's still rolling out so you're likely not
| seeing it yet!
|
| Hope you like it once it reaches you :)
|
| [1] https://workspaceupdates.googleblog.com/2022/03/compose-
| with...
| remoquete wrote:
| Such a huge quality of life improvement for technical writers
| who rely on Gsuite collaboration features while editing
| Markdown docs. Thank you!
| jcastro wrote:
| This is going to save me so much time, thank you for this!
| sbergot wrote:
| Thank you for making that! I was using a plugin to export to
| markdown but it wasn't ideal.
| tomgp wrote:
| Thank you! This is going to make my life MUCH easier
| irskep wrote:
| Is it also supported in the Google Drive export API? It's not
| in the docs yet at least.
| https://developers.google.com/drive/api/guides/ref-export-fo...
| tomeraberbach wrote:
| Yes, it will be supported by this API! I actually wasn't
| aware of this documentation page. I'll make sure it gets
| updated. Thanks for flagging
| scrollaway wrote:
| Oh that's great. Does that mean Google drive will have good
| markdown previews now?
| tomeraberbach wrote:
| No, this feature doesn't affect the preview. We don't
| convert a Markdown file to a Doc unless a user initiates
| it
| sandbx wrote:
| I would like to be able to open and edit .md files in Google
| Docs on desktop and mobile like how Google Docs supports
| opening .docx files
| supriyo-biswas wrote:
| Is it possible to get this feature in Slides as well?
|
| I often need to prepare technical slides with code in it, and
| being able to just backtick away into a <code> tag or a <pre>
| block would be a godsend.
| breck wrote:
| Not sure if you have the patience to use a beta product, but
| I recently started adding slideshows to Scroll.
|
| This source code:
| http://hub.scroll.pub/slideshowdemo/index.scroll
|
| Produces this HTML: http://hub.scroll.pub/slideshowdemo/
| sphars wrote:
| Not an answer to your question because this isn't integrated
| with Slides, but Slidev[0] can be used for creating
| slidedecks in Markdown
|
| [0]: https://github.com/slidevjs/slidev
| RandomWorker wrote:
| Thanks for doing this! It's amazing feature to use docs to
| compose and paste to my Hugo blog. Very good workflow
| _boffin_ wrote:
| Question: when coming up with tests (whatever level they might
| be) before you submit your code, what's your thought process
| about what tests to include? What edge cases to handle? What to
| not test? Is there much disagreement about what to test?
| tomeraberbach wrote:
| We did indeed write A LOT of tests!
|
| I would say there wasn't much disagreement there. I typically
| started out by writing tests for the simple cases, then I
| would identify edge cases through actual usage of the feature
| locally, and write tests for those as well. Also, whenever
| bugs were found, I would write "regression test cases" for
| those when fixing.
| whycome wrote:
| Google keep...
| chrisfinazzo wrote:
| I would have expected this to export CommonMark, but it seems
| like it's not quite up to that yet. Is that on the board for a
| future release?
|
| This isn't to say I prefer CM -- because Markdown came into
| being from Gruber's script. In a literal sense, "Markdown" is
| defined as whatever `markdown.pl` is, warts and all -- however,
| contact with the outside world forced things to move in a
| direction that is (so to speak) more organized that what John
| originally wrote.
| tomeraberbach wrote:
| The export part of the feature does support everything that
| CommonMark does! Curious what gave you the impression that it
| doesn't?
| hellojebus wrote:
| Will the API support uploading conversion of markdown to
| "application/vnd.openxmlformats-
| officedocument.wordprocessingml.document"? I process thousands
| of documents each month -- often have to parse from HTML to
| Markdown to Docx then finally upload and convert to Google Doc
| format.
| tomeraberbach wrote:
| It will support importing Markdown as a Google Doc.
|
| I won't support directly importing Markdown as DOCX. For that
| you could convert from Markdown to Docs to DOCX though.
| scrollaway wrote:
| Check out Pandoc.
| ted_dunning wrote:
| I can't wait.
|
| This will make a huge difference to a lot of my work.
| andybak wrote:
| The main effect of slow rollouts on me is that I never use the
| feature. It goes like this.
|
| 1. There's a service I use sporadically or used to use
|
| 2. They announce a new feature that might potentially mean I'll
| start using it again/more
|
| 3. I read the post, log in and realise I don't have access yet
|
| 4. I completely forget this ever happened.
|
| Surely all the effort that goes into announcing these things is
| a bit _wasted_ ?
|
| What happened to the a nice "Labs" switch to opt into stuff
| that's new and a bit raw?
| pradn wrote:
| It is a bit odd how they do it in Docs. In Cloud,
| announcements happen when the feature has already fully
| rolled out. Note, this is separate from region expansion,
| which might be delayed for some heavy-weight features (like
| new categories of VMs requiring special hardware.)
| skybrian wrote:
| Not announcing a feature in a collaborative environment
| would likely cause a fair bit of confusion when only some
| people see it.
| tomeraberbach wrote:
| I can't speak to the reasoning for announcing before 100%
| rollout, but I can say that the slow rollout is for safety.
| That way if there's a severe bug, then we can catch it while
| it affects a small number of users, instead of all users.
|
| Labs is more for experimental features that needs more beta
| testing before rolling out to everyone, rather than being the
| "first stage" of slow rollout.
| dpkirchner wrote:
| At least it's available to paying customers, that's not
| always the case.
| startupsfail wrote:
| Would appreciate support for comments, with CriticMarkup or
| something.
| zikani_03 wrote:
| Is this also available from the googlecloud APIs libraries?
| Would be neat to be able to create a Google Doc from markdown
| content, it's something we were going to look into for one of
| the things we are building.
| tomeraberbach wrote:
| This will be supported by the Drive APIs
| jez wrote:
| How does it handle images in the imports and exports?
| ahimthedream wrote:
| Can I sync MD files to drive through the osx drive integration?
| Allowing me to work on a local file in MD, but others can view
| through web
| munificent wrote:
| You are my hero.
|
| I work at Google in open source so I am constantly converting
| Google Docs to Markdown to put them on GitHub and vice versa.
| This will save me a lot of effort.
| peterarmstrong wrote:
| Thank you from Leanpub!
| mikelnrd wrote:
| Is there an API to export a Google doc as markdown?
| stevemk14ebr wrote:
| Yes, and to import. You mess with the mime types when creating
| a document or exporting and the conversion operation happens.
| Standard gdocs APIs cover conversion of formats already with
| doc files as an example.
| neontomo wrote:
| markdown is such an elegant markup implementation, i remember
| using bbcode on online forums which was ok but markdown i use all
| the time to keep notes and organise my thoughts. when i do
| consulting i summarise my work in a github gist.
|
| look forward to trying this.
| einpoklum wrote:
| LibreOffice has an open issue requesting Markdown export support:
|
| https://bugs.documentfoundation.org/show_bug.cgi?id=160734
| dalrympm wrote:
| I don't see any mention of table support. That will be the first
| thing I try, I hope it works... if not now, eventually.
| stevemk14ebr wrote:
| They are supported (source: beta tested it internally). We use
| this markdown feature for some internal workflows where github
| flavor markdown syntax is used. We've tested this works and
| ourselves rely on it as well as some other markdown extensions.
| yboris wrote:
| In the past I used the _Docs to Markdown_ add-on that has worked
| well [1]
|
| Google Docs -> Markdown -> Hugo website was a great workflow:
| https://github.com/whyboris/utilitarianism.net
|
| [1]
| https://workspace.google.com/u/0/marketplace/app/docs_to_mar...
| mavsman wrote:
| I would imagine that requests for this feature went way up as
| ChatGPT has popularized.
| esprehn wrote:
| This is a great feature (and probably related to reliance on
| markdown from all the LLM services). I do wish they'd add SVG
| import to slides though, that's been a top feature request for
| like a decade.
| tiffanyh wrote:
| OT: Has anyone noticed performance improvements since Google
| migrated Docs away from using DOM, and over to using Canvas?
|
| https://news.ycombinator.com/item?id=27129858
| bapetel wrote:
| Good ! I use notion and sometimes when i copy a text from notion
| to docs, i have to format it again. Now i would not do it.
| wscott wrote:
| So, can we now write a plugin for Obsidian that syncs changes to
| Google Drive?
| amaldavid wrote:
| Finally they realized too many people were copying information
| from chatgpt and claude and didn't like seeing #####
___________________________________________________________________
(page generated 2024-07-17 23:04 UTC)