Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

docs md editor (#1972)

Akshay Agrawal865f8157ce91
diff --git a/docs/_static/docs-markdown-toggle.gif b/docs/_static/docs-markdown-toggle.gif
new file mode 100644
index 0000000000..705c535e2f
Binary files /dev/null and b/docs/_static/docs-markdown-toggle.gif differ
diff --git a/docs/guides/outputs.md b/docs/guides/outputs.md
index 3ab873286e..391d64e799 100644
--- a/docs/guides/outputs.md
+++ b/docs/guides/outputs.md
@@ -43,7 +43,7 @@ mo.md(
)
```
-Notice that marimo knows how to render marimo objects in markdown: can just
+Notice that marimo knows how to render marimo objects in markdown: you can just
embed them in [`mo.md()`](/api/markdown) using an f-string, and marimo will
figure out how to display them!
@@ -61,12 +61,22 @@ mo.md(
)
```
-```{admonition} Markdown editor
-:class: tip
+### Markdown editor
-marimo can render cells that only use `mo.md()`, without an `f`-string, in a
-markdown editor that supports common hotkeys.
-```
+marimo automatically renders cells that only use `mo.md("")`, without an
+`f`-string, in a markdown editor that supports common hotkeys.
+
+Because the Markdown editor doesn't support f-strings, you'll need to use
+`mo.md` directly to interpolate Python values into your Markdown. You can
+switch between the Markdown and Python editors by clicking the button in the
+top right.
+
+<div align="center">
+<figure>
+<img src="/_static/docs-markdown-toggle.gif"/>
+<figcaption>marimo is pure Python, even when you're using markdown.</figcaption>
+</figure>
+</div>
## Layout