惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
D
Docker
GbyAI
GbyAI
宝玉的分享
宝玉的分享
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Vercel News
Vercel News
博客园_首页
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
S
SegmentFault 最新的问题
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
V
V2EX
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
IT之家
IT之家
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

Steve Hanov's Blog

How this Canadian Startup Bought Millions of Impressions for $8,000 How to Run a Fellowship Program Into the Ground (and get 18M impressions in the process) My Waterloo Intern went back to school. I'll miss him dearly but here's how I replaced him with Hermes I learned Mandarin. Here's what it taught me about B2C SaaS. The VC's Waterloo Coffee Tour: Where to Find Canada's Next Unicorn How I run multiple $10K MRR companies on a $20/month tech stack A Ralph Loop for Reading: Beating GPT 5.2 with a 4k Context Window (and 4 GPUs) I built a Chrome extension that lets an LLM “see” tweets Fighting Blog Comment Spam with Qwen3 and Ollama Make a web page screenshot service Automatically remove wordiness from your writing I found Security Vulnerability in your web application How to detect if an object has been garbage collected in Javascript My favourite Google Cardboard Apps O(n) Delta Compression With a Suffix Array Finding Bieber: On removing duplicates from a set of documents Let's read a Truetype font file from scratch A Quick Measure of Sortedness My thoughts on various programming languages A little VIM hacking
How to Save a Gemini Canvas as Markdown
2026-03-14 · via Steve Hanov's Blog

I was working on a project the other night, using Google's Gemini to help brainstorm a technical plan. If you've used it recently, you've probably seen the "Canvas" feature. It pops up on the right side of your screen, rendering code and text beautifully. It looks great.

But then I actually finished the document, and I needed to get that text out of the browser and into my actual codebase. I looked around the sleek interface for a "Save as Markdown" button. It doesn't exist.

If you are trying to extract a Gemini Canvas as markdown, you usually attempt the naive solution first: you click inside the canvas, press Ctrl+A, and Ctrl+C. You paste it into your editor, and instantly realize your mistake. You don't get markdown. You get a formatting disaster—a jumble of lost line breaks, stripped headers, and weird spacing.

This actually matters. When you are pasting a technical plan or documentation back into an LLM, that formatting is highly important. Under the hood, LLMs are trained and optimized to read and write raw markdown text, not whatever rich-text soup the browser clipboard spits out.

If you Google for a solution to this, you'll find two terrible workarounds.

The first is the "official" route: click "Export to Google Docs," wait for it to open, and then go to File -> Download -> Markdown. This takes way too long, and worse, you are left with hundreds of useless, orphaned documents permanently cluttering your Google Drive.

The second is the "prompt engineering" route. You type the magic words: "Copy this entire canvas as markdown into a code block." This is surprisingly hit or miss. Because of escaping issues—code blocks nested inside other code blocks—the LLM often breaks the formatting halfway through. Plus, it takes a full minute to generate, wasting expensive GPU cycles in a datacenter somewhere just to print text that has already been calculated and is sitting right there on your screen.

We just want our text file.

The Solution: A Quick Userscript

To fix this annoyance permanently, I wrote a quick script that reaches into the page and downloads the raw markdown for you.

image.png

If you just want the tool, you can grab it from GitHub here: gemini-to-markdown.

To run it, you'll need Tampermonkey.

What is Tampermonkey? If you haven't heard of it, Tampermonkey is a popular, free browser extension (available for Chrome, Firefox, Safari, etc.) that acts as a user script manager. It basically allows you to inject tiny snippets of your own JavaScript into specific websites to change how they look or behave. It's the perfect tool for fixing minor UI annoyances on the web without having to build a full-blown browser extension.

How to Install It

Getting this set up takes about thirty seconds:

  1. Install Tampermonkey: Head over to your browser's extension store and install the Tampermonkey extension.
  2. Get the Script: Go to the gemini-to-markdown repository on GitHub.
  3. Install: Click on the gemini-to-markdown.user.js file, and click the "Raw" button. Tampermonkey will automatically detect the script and pop up an install screen. Just click "Install". That's it. The next time you open a Gemini Canvas, you'll have a quiet, reliable way to extract your clean markdown, without the Google Drive clutter or the datacenter GPU waste.