Skip to content

Configure rendering

Start with a working React, Vue or Mantine setup. Then choose the layer you need to change. React and Vue share parsing options, but their component and styling APIs differ.

GoalConfigurationGuide
Show incoming textUpdate the accumulated content; set streaming from producer stateStreaming input
Smooth bursty updatesUse the framework’s smooth component or hook/composableReact · Vue
Select optional syntax transformsenginePluginsMarkdown features
Clean up source text before parsingcontentPreprocessorsPreprocessors
Replace links, code blocks or other elementsReact customComponents; Vue components or named slotsReact · Vue
Change fonts, spacing and colorsReact typography/CSS variables; Vue wrapper styles; Mantine themeReact · Vue · Mantine
Control allowed HTML and URLssanitizeSchema and urlTransformLinks and HTML safety
Share references across sectionsAIMarkdownDocuments with an explicit document idDocuments and references

GFM, math processing, emoji, source line breaks, CJK-aware delimiter parsing and guarded raw HTML belong to the base pipeline. The five shipped optional plugins are enabled by default. Passing enginePlugins replaces that optional set; an empty array does not disable the base pipeline or sanitization.

The highlight plugin means ==marked text==, not code syntax highlighting. Code highlighting and Mermaid require Mantine or your own renderer. See the syntax overview for the full distinction.

Define plugin arrays, preprocessors and policy objects outside the render function when they are constant. If they depend on application settings, keep their references stable until those settings change. For Vue composables, pass a live getter so later updates remain observable.

The plugin catalog accepts only the shipped objects. Arbitrary remark/rehype plugins are not accepted through enginePlugins; use the documented preprocessing and custom-rendering extension points instead.

streaming describes the producer; it is not the switch for incremental parsing. React’s cursor is opt-in, while Vue’s is enabled by default. React typography props and hooks do not apply to Vue.

URL transformation runs after sanitization. A custom component must also apply the application’s output policy to URLs or HTML it creates. Follow Links and HTML safety before changing either stage.

Use React props, Vue component props or Mantine configuration for types, defaults and precedence. For an unexpected result, start with troubleshooting.