News for hackers. Stuff that matters.
Re:Import and Export Markdown in Google Docs by tomeraberbach on Wednesday July 17, 2024 @07:53AM (#40984859)
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...

Re:Import and Export Markdown in Google Docs by remoquete on Wednesday July 17, 2024 @08:18AM (#40985038)
Such a huge quality of life improvement for technical writers who rely on Gsuite collaboration features while editing Markdown docs. Thank you!
Re:Import and Export Markdown in Google Docs by jcastro on Wednesday July 17, 2024 @09:01AM (#40985413)
This is going to save me so much time, thank you for this!
Re:Import and Export Markdown in Google Docs by sbergot on Wednesday July 17, 2024 @09:09AM (#40985496)
Thank you for making that! I was using a plugin to export to markdown but it wasn't ideal.
Re:Import and Export Markdown in Google Docs by tomgp on Wednesday July 17, 2024 @09:27AM (#40985694)
Thank you! This is going to make my life MUCH easier
Re:Import and Export Markdown in Google Docs by irskep on Wednesday July 17, 2024 @09:27AM (#40985695)
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...
Re:Import and Export Markdown in Google Docs by tomeraberbach on Wednesday July 17, 2024 @09:42AM (#40985861)
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
Re:Import and Export Markdown in Google Docs by scrollaway on Wednesday July 17, 2024 @10:35AM (#40986393)
Oh that’s great. Does that mean Google drive will have good markdown previews now?
Re:Import and Export Markdown in Google Docs by tomeraberbach on Wednesday July 17, 2024 @05:24PM (#40990501)
No, this feature doesn't affect the preview. We don't convert a Markdown file to a Doc unless a user initiates it
Re:Import and Export Markdown in Google Docs by tomeraberbach on Thursday July 18, 2024 @05:51PM (#41000101)
Should be updated now
Re:Import and Export Markdown in Google Docs by sandbx on Wednesday July 17, 2024 @09:41AM (#40985846)
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
Re:Import and Export Markdown in Google Docs by supriyo-biswas on Wednesday July 17, 2024 @10:04AM (#40986101)
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.

Re:Import and Export Markdown in Google Docs by breck on Wednesday July 17, 2024 @11:24AM (#40986885)
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/

Re:Import and Export Markdown in Google Docs by sphars on Wednesday July 17, 2024 @01:45PM (#40988404)
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

Re:Import and Export Markdown in Google Docs by RandomWorker on Wednesday July 17, 2024 @10:09AM (#40986141)
Thanks for doing this! It’s amazing feature to use docs to compose and paste to my Hugo blog. Very good workflow
Re:Import and Export Markdown in Google Docs by _boffin_ on Wednesday July 17, 2024 @10:33AM (#40986381)
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?
Re:Import and Export Markdown in Google Docs by tomeraberbach on Wednesday July 17, 2024 @11:26AM (#40986910)
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.

Re:Import and Export Markdown in Google Docs by whycome on Wednesday July 17, 2024 @10:55AM (#40986601)
Google keep…
Re:Import and Export Markdown in Google Docs by chrisfinazzo on Wednesday July 17, 2024 @11:05AM (#40986714)
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.

Re:Import and Export Markdown in Google Docs by tomeraberbach on Wednesday July 17, 2024 @11:22AM (#40986867)
The export part of the feature does support everything that CommonMark does! Curious what gave you the impression that it doesn't?
Re:Import and Export Markdown in Google Docs by chrisfinazzo on Thursday July 18, 2024 @11:40AM (#40996697)
Admittedly, I didn't spend more than 5-10 minutes looking through the specs ¯\_(ツ)_/¯

The existence of comments about how certain elements were rendered on export made me think that something was missing when compared with CM.

Re:Import and Export Markdown in Google Docs by hellojebus on Wednesday July 17, 2024 @11:09AM (#40986742)
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.
Re:Import and Export Markdown in Google Docs by tomeraberbach on Wednesday July 17, 2024 @11:24AM (#40986884)
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.

Re:Import and Export Markdown in Google Docs by scrollaway on Wednesday July 17, 2024 @01:13PM (#40988051)
Check out Pandoc.
Re:Import and Export Markdown in Google Docs by ted_dunning on Wednesday July 17, 2024 @11:57AM (#40987282)
I can't wait.

This will make a huge difference to a lot of my work.

Re:Import and Export Markdown in Google Docs by andybak on Wednesday July 17, 2024 @12:25PM (#40987572)
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?

Re:Import and Export Markdown in Google Docs by callalex on Wednesday July 17, 2024 @04:14PM (#40989909)
The purpose of the announcements is for career advancement within Google. Actual impact to end users is not terribly relevant to that.
Re:Import and Export Markdown in Google Docs by tomeraberbach on Wednesday July 17, 2024 @02:08PM (#40988645)
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.

Re:Import and Export Markdown in Google Docs by m-p-3 on Thursday July 18, 2024 @07:50AM (#40994719)
I wish we could opt-in to get early access in the slow rollout. That way you get the enthousiastic users to promote the incoming feature and you get some tech savvy people to test it before it reaches out more people.
Re:Import and Export Markdown in Google Docs by phil294 on Thursday July 18, 2024 @09:38AM (#40995480)
That doesn't contradict the parent comment though. Engaged users should have an option somewhere to enable it, barely affecting the overall rollout.
Re:Import and Export Markdown in Google Docs by sheikheddy on Thursday July 18, 2024 @11:56PM (#41001911)
It’s not about gating the new feature behind a flight, but not wanting to push a new build out to the furthest deployment ring before you need to.
Re:Import and Export Markdown in Google Docs by pradn on Wednesday July 17, 2024 @12:56PM (#40987869)
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.)
Re:Import and Export Markdown in Google Docs by skybrian on Wednesday July 17, 2024 @06:51PM (#40991068)
Not announcing a feature in a collaborative environment would likely cause a fair bit of confusion when only some people see it.
Re:Import and Export Markdown in Google Docs by TeMPOraL on Thursday July 18, 2024 @08:05AM (#40994815)
Docs is supposedly a collaborative environment; without collaborative features, you're better off going back to Microsoft Word.
Re:Import and Export Markdown in Google Docs by dpkirchner on Wednesday July 17, 2024 @02:12PM (#40988686)
At least it's available to paying customers, that's not always the case.
Re:Import and Export Markdown in Google Docs by startupsfail on Wednesday July 17, 2024 @12:31PM (#40987630)
Would appreciate support for comments, with CriticMarkup or something.
Re:Import and Export Markdown in Google Docs by zikani_03 on Wednesday July 17, 2024 @02:10PM (#40988668)
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.
Re:Import and Export Markdown in Google Docs by tomeraberbach on Wednesday July 17, 2024 @02:12PM (#40988690)
This will be supported by the Drive APIs
Re:Import and Export Markdown in Google Docs by jez on Wednesday July 17, 2024 @03:30PM (#40989441)
How does it handle images in the imports and exports?
Re:Import and Export Markdown in Google Docs by tomeraberbach on Thursday July 18, 2024 @10:20AM (#40995814)
Import supports links via upload

Export outputs base64 encoded image URLs. We use Markdown reference links to place the large URLs out of the way of reading at the bottom of the file

Re:Import and Export Markdown in Google Docs by vikramaruchamy on Friday July 26, 2024 @09:02AM (#41078270)
When I export Markdown, the image reference is placed like `[image-1][base64-reference]`. However, the reference links should be `[image-1](base64-reference)`. The brackets for the reference should be parentheses, not square.

Any hint on why you have used square brackets?

Re:Import and Export Markdown in Google Docs by tomeraberbach on Friday July 26, 2024 @07:21PM (#41083191)
Link _references_ must be enclosed in brackets. Only _inline_ link URLs use parentheses

See https://daringfireball.net/projects/markdown/syntax#link

Re:Import and Export Markdown in Google Docs by vikramaruchamy on Monday July 29, 2024 @03:11AM (#41098469)
Thank you for your reply and sorry for my ignorance. I didn't look much about reference links before writing this.
Re:Import and Export Markdown in Google Docs by tomeraberbach on Monday July 29, 2024 @09:22AM (#41100260)
No worries! Glad I could send some new knowledge your way :)
Re:Import and Export Markdown in Google Docs by ahimthedream on Wednesday July 17, 2024 @03:36PM (#40989506)
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
Re:Import and Export Markdown in Google Docs by munificent on Wednesday July 17, 2024 @05:01PM (#40990315)
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.

Re:Import and Export Markdown in Google Docs by peterarmstrong on Wednesday July 17, 2024 @05:37PM (#40990584)
Thank you from Leanpub!
Re:Import and Export Markdown in Google Docs by shadowgovt on Wednesday July 17, 2024 @07:45PM (#40991337)
Super cool. Well done! I've been wanting this for awhile; glad to see it.
Re:Import and Export Markdown in Google Docs by hereme888 on Wednesday July 17, 2024 @08:43PM (#40991583)
Duuuuuuuuude, I was just thinking a few days ago: how come markdown isn't yet a thing in word editors?

Well, you solved it. Thanks!

Re:Import and Export Markdown in Google Docs by themadturk on Thursday July 18, 2024 @10:18PM (#41001561)
Just for reference, Writage is a Word (Mac and Windows) add-in that exports and imports Markdown.
Re:Import and Export Markdown in Google Docs by lewisjoe on Thursday July 18, 2024 @01:28AM (#40992748)
Hi, thanks for this amazing work.

Just curious: Google docs supports a lot more than what Markdown has syntaxes for - how do you deal with this when exporting to markdown?

Re:Import and Export Markdown in Google Docs by tomeraberbach on Thursday July 18, 2024 @10:19AM (#40995802)
We export to the closest available thing (e.g. file chips become links, people chips become mailto links, etc.) or drop the content entirely if there's truly nothing it can be converted to (rare case)
Re:Import and Export Markdown in Google Docs by westurner on Thursday July 18, 2024 @08:57AM (#40995156)
Thanks!

Google Colab also supports Markdown input cells as "Text" with a preview.

Does this work with Google Sites?

How to create a Google Sites page from a Markdown doc, with MyST Markdown YAML front matter

NotebookLM can generate Python, LaTeX, and Markdown.

How to Markdown and Git diff on a Chromebook without containers or Inspect Element because [...]

How to auto-grade Jupyter Notebooks with Markdown prose, with OtterGrader

How to build a jupyter-book from .rst, MyST Markdown .md, and .ipynb jupyter/nbformat notebooks containing MyST Markdown

Re:Import and Export Markdown in Google Docs by davecahill on Thursday July 18, 2024 @09:24AM (#40995339)
The announcement of the new feature (which I don't have just yet) made me realize that the automatic detection feature existed, and I love it. :)
Re:Import and Export Markdown in Google Docs by freedomben on Thursday July 18, 2024 @09:57AM (#40995630)
I just wanted to say, it took me a while to discover it (it happened by accident), but the preexisting feature from 2022 was a joy to discover! I didn't know you obviously, but I praised the kind anonymous soul out there who did that. I discovered it about 6 months ago, and I use it all the time now. I'm super excited to see it progress!
Re:Import and Export Markdown in Google Docs by chrisbrandow on Tuesday July 23, 2024 @03:15PM (#41049688)
Any idea how long is this rollout going to be? I still don't have access to it. (not that you're in charge of the rollout pace)
Re:Import and Export Markdown in Google Docs by tomeraberbach on Tuesday July 23, 2024 @06:19PM (#41051580)
Should be rolled out to everyone by sometime next week

See this heading: https://workspaceupdates.googleblog.com/2024/07/import-and-e...