CuteMarkEd icon indicating copy to clipboard operation
CuteMarkEd copied to clipboard

Export of Mermaid diagrams

Open BsNoSi opened this issue 9 years ago • 1 comments

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.

BsNoSi avatar Jan 04 '16 07:01 BsNoSi

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());

cloose avatar Jan 04 '16 07:01 cloose