개발자 도구
Markdown 편집기
markdown-editor
Markdown Editor 기능을 Zavilo SDK에서 사용하는 방법입니다. 아래에서 입력 제한, 파라미터, 출력 형식과 지원 모드를 확인할 수 있습니다.
H · Headless
빠른 이동
입력 파일 0–1출력 파일 1–2
입력
이 Tool이 허용하는 입력 형식과 파일 개수입니다.
| 입력 종류 | file-or-data |
|---|---|
| 파일 수 | 0 – 1 |
| 허용 MIME 형식 | text/markdown, text/plain |
파라미터
아래 값은 request.options에 전달합니다.
| 파라미터 | 타입 | 필수 | 기본값 | 허용값 / 범위 | 설명 |
|---|---|---|---|---|---|
output |
enum | 선택 | html |
html | markdown | both | Generated file output. html creates an HTML file, markdown returns Markdown, both returns both files. |
sanitize |
boolean | 선택 | true |
— | Sanitize rendered HTML with DOMPurify before returning or exporting it. |
gfm |
boolean | 선택 | true |
— | Enable GitHub-Flavored Markdown features such as tables and task-list syntax. |
includeStyles |
boolean | 선택 | true |
— | Wrap HTML output in a standalone document with simple readable CSS. |
documentTitle |
string | 선택 | Markdown Document |
— | HTML document title used when includeStyles is enabled. |
출력
처리가 완료되면 반환되는 결과 형식입니다.
| 출력 종류 | files+data |
|---|---|
| 파일 수 | 1 – 2 |
| 출력 MIME | text/html, text/markdown |
| Metadata | words, characters, lines, sanitized |
| ZIP 묶음 | 미지원 |
기본 사용 예제
지원되는 연동 모드를 확인하고 생성된 시작 코드를 바로 복사할 수 있습니다.
Headless
const result = await client.run("markdown-editor", {
options: { output: "html", sanitize: true, gfm: true, includeStyles: true }
});
console.log(result.files, result.data, result.metadata);
Embedded
await client.mount({ tool: "markdown-editor", target: "#zavilo-tool", mode: "embedded" });
이 명세는 실제 SDK 런타임이 사용하는 Tool Definition을 기준으로 자동 생성됩니다.