Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 2.01 KB

plugin-screenshot.md

File metadata and controls

72 lines (51 loc) · 2.01 KB

Table of Contents

Screenshot (Export as Image) experimental

It's strongly recommended that you read Experimental Features to fully understand the risks before using this feature.

This feature can support to export mind maps as png images.

<!-- style -->
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected]/style/jsmind.css" />

<!-- jsMind -->
<script type="text/javascript" src="https://unpkg.com/[email protected]/es6/jsmind.js"></script>

<!-- dependency of screenshot -->
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/dom-to-image.min.js" ></script>

<!-- screenshot plugin -->
<script type="text/javascript" src="https://unpkg.com/[email protected]/es6/jsmind.screenshot.js"></script>


<script>
    var jm = new jsMind(options);
    jm.show(mind_data);
    // export current mindmap to an image
    jm.shoot()
</script>

If you use npm, please install jsmind and dom-to-image

npm install jsmind
npm install dom-to-image

And then use it the same way on the page.

<script>
    import domtoimage from 'dom-to-image';
    import jsMind from 'jsmind'
    import 'jsmind/screenshot'
    import 'jsmind/style/jsmind.css'

    // ...

    var jm = new jsMind(options);
    jm.show(mind_data);
    // export current mindmap to an image
    jm.shoot()
</script>

copyright notice

Reproduction and deduction are prohibited.

The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.