Outils développeur
Éditeur Markdown
markdown-editor
Use Markdown Editor through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · Headless
Accès rapide
Fichiers d’entrée 0–1Fichiers de sortie 1–2
Entrée
Formats d’entrée et nombre de fichiers acceptés par cette Tool.
| Type d’entrée | file-or-data |
|---|---|
| Nombre de fichiers | 0 – 1 |
| MIME acceptés | text/markdown, text/plain |
Paramètres
Transmettez ces valeurs via request.options.
| Paramètre | Type | Obligatoire | Par défaut | Valeurs / Plage | Description |
|---|---|---|---|---|---|
output |
enum | Optionnel | html |
html | markdown | both | Generated file output. html creates an HTML file, markdown returns Markdown, both returns both files. |
sanitize |
boolean | Optionnel | true |
— | Sanitize rendered HTML with DOMPurify before returning or exporting it. |
gfm |
boolean | Optionnel | true |
— | Enable GitHub-Flavored Markdown features such as tables and task-list syntax. |
includeStyles |
boolean | Optionnel | true |
— | Wrap HTML output in a standalone document with simple readable CSS. |
documentTitle |
string | Optionnel | Markdown Document |
— | HTML document title used when includeStyles is enabled. |
Sortie
Format du résultat renvoyé après traitement.
| Type | files+data |
|---|---|
| Nombre de fichiers | 1 – 2 |
| MIME de sortie | text/html, text/markdown |
| Metadata | words, characters, lines, sanitized |
| Archive ZIP | Non pris en charge |
Utilisation de base
Choisissez un mode pris en charge et copiez le code de démarrage généré.
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.