Skip to main content

CnWidgetWikiRenderer

CnWidgetWikiRenderer is the built-in v2 widget that exposes CnWikiPage to the manifest layer. It's a transparent pass-through — all wiki-relevant props are forwarded.

Import

import { CnWidgetWikiRenderer } from '@conduction/nextcloud-vue'

Manifest usage

Referenced via widgetKey: "wiki-renderer":

{
"id": "docs-wiki",
"slot": "body",
"widgetKey": "wiki-renderer",
"gridWidth": 12,
"props": {
"article": { "id": "intro", "title": "Introduction", "body": "..." },
"tree": [{ "id": "intro", "label": "Introduction" }]
}
}

Props

Forwarded verbatim to CnWikiPage:

PropTypeDescription
articleObjectThe article record to render.
treeArraySidebar tree of articles.
registerStringRegister slug to fetch wiki articles from (self-fetch mode).
schemaStringSchema slug for the article objects.
contentFieldStringProperty name on the article object containing the markdown body. Defaults to content.
titleFieldStringProperty name on the article object containing the title. Defaults to title.
idParamStringRoute param name used to deep-link a specific article. Defaults to id.
sidebarSchemaStringSchema slug for the sidebar tree's object kind (when different from the body schema).
sidebarRegisterStringRegister slug for the sidebar tree (when different from the body register).

See the CnWikiPage docs for the complete surface (layout slots, edit mode, search hooks, etc.).

Events

All listeners are forwarded to CnWikiPage.

Spec

  • REQ-MVR-008 (manifest-v2-renderer) — built-in widget: wiki-renderer