Skip to main content

export-mind-map-as-image

Guide for exporting mind maps as images using the built-in SCST engine from `@mind-elixir/export-mindmap`.

소스 정보

저장소
SSShooter/mind-elixir-core
최근 소스 활동
2026년 8월 7일 02:36
감지된 SKILL.md 언어
영어
스타
3,179
포크
417

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
Export Mind Map as Image
description
Guide for exporting mind maps as images using the built-in SCST engine from `@mind-elixir/export-mindmap`.
# Export Mind Map as Image Mind Elixir exports images through the built-in SCST engine from `@mind-elixir/export-mindmap`. SCST is a lightweight, high-performance DOM-to-image library based on SVG `<foreignObject>` + Canvas, with zero third-party screenshot dependencies. ## 1. Installation Install `@mind-elixir/export-mindmap` as a dependency. ```bash npm install @mind-elixir/export-mindmap ``` ## 2. Usage Use the `downloadImage` / `exportImage` functions to capture the mind map nodes and download them. ```typescript import { downloadImage, exportImage } from '@mind-elixir/export-mindmap' // Assuming `mind` is your MindElixir instance // Download as PNG / JPEG / WEBP await downloadImage(mind, 'png') // format: 'png' | 'jpeg' | 'webp' // Or get the URL for preview / custom handling instead of downloading const url = await exportImage(mind, 'png') ``` ## 3. Using SCST directly SCST is also exported from the package and can be used to screenshot any DOM element. ```typescript import { domToBlob, domToDataURL, domToObjectURL } from '@mind-elixir/export-mindmap' const blob = await domToBlob(element, 'png', options) const dataUrl = await domToDataURL(element, 'jpeg', options) const objectUrl = await domToObjectURL(element, 'webp', options) // most memory-efficient for downloads ``` > **Note**: The built-in `mind.exportSvg()` method is deprecated. Please use the method above for new projects.
GitHub에서 보기