JSON Render
Example showing how to use Comark with JSON Render in Vue and Vite.
Features
This example demonstrates how to use Comark with JSON Render in Vue:
- JSON Render Plugin: Import and configure the
json-renderplugin to parsejson-rendercode blocks - Full Spec Format: Define a tree of named elements with a root entry point
- Single Element Shorthand: Use a simplified format for single elements
- Nested Layout: Compose deep component trees by referencing children by key
- Nuxt UI: Styled with Nuxt UI for a polished look with dark mode support
Usage
- Import the json-render plugin:
import jsonRender from '@comark/vue/plugins/json-render' - Pass the plugin to Comark:
<Comark :plugins="[jsonRender()]" /> - Use json-render code blocks in your markdown:
```json-render { "type": "Text", "props": { "content": "Hello" } } ```