Convert a page to another editor
convert_page_editorConvert a Wiki.js page's storage format to correct a page created with the wrong editor. Choose markdown, ckeditor, code, or asciidoc; body content remains untranslated.
Instructions
Changes the storage format of a page. Wiki.js does not translate the body — converting markdown to "code" leaves the markdown source as raw HTML text. Use it to correct a page created with the wrong editor, not to reformat one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Page path without a leading slash and without the locale prefix, e.g. "docs/setup". A browser URL looks like /en/docs/setup — drop the "en/", it is the locale argument. (Not enforced: "ci/", "db/" and "qa/" are perfectly good first segments that happen to look like locale codes.) | |
| editor | Yes | Storage format. "markdown" for markdown source, "ckeditor" for rich-text HTML, "code" for raw HTML, "asciidoc" for AsciiDoc. | |
| locale | No | Locale code. Defaults to WIKIJS_LOCALE. The locale is part of a page’s identity. | |
| page_id | No | Numeric Wiki.js id. | |
| confirm_token | No | Token from this tool’s previous, unconfirmed call. Omit it to receive one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truncated | No | Present only when the answer was shortened to fit the budget. |