Skip to content

Quarto execution option editor does not work #81

Description

@Mads-PeterVC

Describe the bug

The #| editor: true option should, as I understand it, show a code editor for the cell.

However, it seems to have no noticeable effect. Instead it seems that the #| echo option decides whether a code cell is shown, but causes both a static code-block and an editor to be shown.

Additionally #| echo does not play nice with #| output - with #| output seemingly being ignored if echo = true.

The tutorial page https://marimo-team.github.io/quarto-marimo/ seems to advertise #| editor but actually uses #| echo from the source

We can make it editable:

```{python .marimo}
#| editor: true
editor_result = "Change me" + ("!" * 3)
editor_result,
```
#| echo: true
editor_result = "Change me" + ("!" * 3)
editor_result,

but the default is to show the output only.

Thanks for the work on this extension, other than this issue it offers a very attractive way of writing interactive documents.

Minimal .qmd to reproduce

---
title: Marimo bug example
external-env: true
---

```{python .marimo}
import marimo as mo
```

## `#| echo` & `#| editor`

```{python .marimo}
static_result = "This is static"
static_result
```

The next cell is supposed to show an editor as it has `#| editor: true`

```{python .marimo}
#| editor: true
editor_result = "Using #| editor: true" + ("!" * 3)
editor_result
```

It however does not. On the otherhand if we use `#| echo: true`

```{python .marimo}
#| echo: true
echo_result = "Using #| echo: true" + ("!" * 3)
echo_result
```

```{python .marimo}
mo.md(
  f"""
  The value of the `static_result`: **{static_result}**

  The value of the `editor_result`: **{editor_result}**

  The value of `echo_result`: **{echo_result}**"""  
  )
```

## `#| echo` & `#| output`

Below is a cell with `#| output: false` which should cause any output to not display. 

```{python .marimo}
#| output: false
mo.md("This won't be shown")
```

```{python .marimo}
#| echo: true
#| output: false
mo.md("This will be shown")
```

Last working marimo version (if known)

No response

Environment

  • quarto version 1.9.38
  • marimo version 0.23.9
  • quarto-marimo version 0.4.5
  • OS: MacOS Tahoe 26.5

Will you submit a PR?

  • Yes, I'd like to fix this

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions