retext-project / retext

ReText: Simple but powerful editor for Markdown and reStructuredText
GNU General Public License v2.0
1.89k stars 196 forks source link

Mermaid extension not working for versions >8.13.0 #570

Closed dpdoughe closed 2 years ago

dpdoughe commented 3 years ago

Following the instruction in issue https://github.com/retext-project/retext/issues/535, I was able to get Mermaid diagrams to render nicely in retext ver 7.1.0-1.

The diagram creation works when including the script with e.g.

<script src="https://unpkg.com/mermaid@8.13.0/dist/mermaid.min.js"></script>

but stops working for any versions after 8.13.0. For example, the diagram is no longer rendered if I use

<script src="https://unpkg.com/mermaid@8.13.1/dist/mermaid.min.js"></script>

Is there a way to know if this is a problem in retext or a problem with the Python extension md-mermaid ?

Thank you!

mitya57 commented 3 years ago

Are you using WebKit or WebEngine renderer?

It may be that the new version requires JS features which are not supported by WebKit.

dpdoughe commented 3 years ago

I am using WebKit renderer. How does one enable WebEngine render? I don't even see an option for that one under the Edit menu.

mitya57 commented 3 years ago

Unfortunately the current stable version doesn't even show Qt WebEngine option if there is WebKit available.

Please replace useWebKit=true with useWebEngine=true in the configuration file (~/.config/ReText project/ReText.conf), then restart ReText. You still won't see the option, but it will use the new renderer.

mitya57 commented 2 years ago

The latest version in master removed support for Qt WebKit, leaving only Qt WebEngine, so I'm closing this bug.