開発者ツール
Markdownエディター
markdown-editor
Use Markdown Editor through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
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" });
This page is generated from the SDK Tool Definition used by the runtime.