CuteMarkEd
CuteMarkEd copied to clipboard
Export of Mermaid diagrams
Mermaid support enhances the usage area of CuteMarkEd very much. It would be perfect, if the HTML export to clipboard would contain MIME64 coded images (PNG) of the diagram. This would support „cut and paste“ of created text into mail, web-pages, a.s.o. without installed mermaid support (esp. mail will never have this).
As a „step between" it would help, if the diagrams are saved as SVG or PNG on export of HTML, like they are embedded in PDF file.
Currently I have to help myself by taking screenshots. Works for me, but it is a little bit more complicated, as is should/could be.
The method buildSVGURL()
in http://knsv.github.io/mermaid/live_editor/scripts/controllers/main.js could give hints how to do it.
With the following code, we should be able to find out if we clicked on a mermaid diagram:
QWebHitTestResult hit = page()->mainFrame()->hitTestContent(pressPoint.toPoint());