Skip to content

Markdown file becomes read-only in rendered mode when it contains a mermaid ` block #2895

Description

@teddyberco

Description

In the Editor canvas, adding a mermaid fenced code block to a markdown file makes the entire file uneditable in rendered (WYSIWYG) mode — not just the diagram block. Text before and after the diagram, headings, and list items all reject input. Switching to <> source mode restores editing.

Steps to reproduce

  1. Open a markdown file in the Editor canvas with this content:

Markdown

# Mermaid edit test

Paragraph BEFORE the diagram — try typing here.

```mermaid
flowchart LR
  A[User] --> B[Skill]
  B --> C[Fabric]

Paragraph AFTER the diagram — try typing here too.

  • list item before
  • list item after






1. Stay in rendered mode.

2. Click into "Paragraph BEFORE the diagram" and type.



**Expected:** Surrounding prose is editable; at most the rendered diagram itself is an atomic/non-editable node.


**Actual:** Nothing is editable anywhere in the file. Editing only works after switching to `<>` source mode.


**Control test (isolates the trigger)**

The same file with `` ```mermaid `` replaced by `` ```text `` is fully editable in rendered mode. The mermaid block is the trigger.


**Impact**

Markdown specs that embed architecture diagrams — a documented, encouraged pattern — lose WYSIWYG editing entirely. In our spec repo this affects 41 files.


**Environment**



- GitHub Copilot app (CLI) v1.0.80

- Windows

- Editor canvas, rendered mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions