Content import operations
1 operation, content.importMarkdown. It runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| content.importMarkdown | Replace the content of a richtext node with Markdown, in one language (the site's main one when locale is absent; the other languages keep theirs). | content.edit | none |
content.importMarkdown
Replace the content of a richtext node with Markdown, in one language (the site's main one when locale is absent; the other languages keep theirs). It reads # headings at their level, paragraphs, nested lists, fenced code with its language, pipe tables (head row as header cells), > **Note:** … quotes as callouts (Note/Nota, Tip/Suggerimento, Warning/Pitfall/Attenzione/Avvertenza; other quotes stay quotes), <kbd> keys, links the rich text allows, **bold**, *em* and code. A picture  must be in the site's media library, named media:<id> or by its file name; one that is not is refused (upload it first). A YAML front matter block is skipped. One undoable tree commit.
Example input
{
"pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
"nodeId": "text0001",
"locale": "en-US",
"markdown": "# Build a page\n\nPress <kbd>Esc</kbd> to select the container.\n\n> **Note:** Every change saves on its own.\n\n```bash\nyarn splash context\n```\n"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| pageId | string | yes | At least 1 character. |
| nodeId | string | yes | |
| markdown | string | yes | At most 400000 characters. |
| locale | string | no | At least 2 characters. At most 35 characters. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| revision | integer | yes | At least 0. |
| inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| blocks | integer | yes | At least 0. |
Try it
yarn splash content.importMarkdown '{"pageId":"6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f","nodeId":"text0001","locale":"en-US","markdown":"# Build a page\n\nPress <kbd>Esc</kbd> to select the container.\n\n> **Note:** Every change saves on its own.\n\n```bash\nyarn splash context\n```\n"}' --dry-runGenerated from the operation registry and the MCP tool catalogue (source 58f7d65da2a58cc7).
Something wrong on this page? Write to docs@librettocms.com.