reflex icon indicating copy to clipboard operation
reflex copied to clipboard

[REF-2625] Use rx.markdown to render mermaid diagrams

Open picklelo opened this issue 1 year ago β€’ 2 comments

Discussed in https://github.com/orgs/reflex-dev/discussions/3125

Originally posted by hragbalian April 20, 2024 Hi there,

I would like to be able to add mermaid diagrams to my markdown but the rx.markdown doesn't render it.

For example, the following code:

```mermaid
    graph TD
        A[Start] -->|Get books| B[Go to library]
        B --> C{Books available?}
        C -->|Yes| D[Borrow books]
        C -->|No| E[Reserve books]
        D --> F[Read books]
        E --> F
        F --> G[Return books]
        G --> H[Finish]

should yield:

    graph TD
        A[Start] -->|Get books| B[Go to library]
        B --> C{Books available?}
        C -->|Yes| D[Borrow books]
        C -->|No| E[Reserve books]
        D --> F[Read books]
        E --> F
        F --> G[Return books]
        G --> H[Finish]

but instead it's rendering as

image

Thanks!

From SyncLinear.com | REF-2625

picklelo avatar Apr 22 '24 18:04 picklelo

It would be highly appreciated! :)

clemlesne avatar Mar 19 '25 15:03 clemlesne

Is this feature available in the latest version?

bldev2473 avatar Sep 06 '25 07:09 bldev2473