The @tanstack/markdown/octane entry requires Octane 0.1.12 or newer.
import {
Markdown,
renderBlockOctane,
renderInlineOctane,
renderMarkdownOctane,
type MarkdownOctaneOptions,
type MarkdownProps,
} from '@tanstack/markdown/octane'Extends RenderOptions with:
interface MarkdownOctaneOptions extends RenderOptions {
components?: Partial<
Record<string, string | ComponentBody<any>>
>
}components replaces an emitted intrinsic or custom element by tag name.
Extends MarkdownOctaneOptions with children: MarkdownInput.
function Markdown(props: MarkdownProps): ElementDescriptorRenders the document children inside an Octane fragment descriptor.
function renderMarkdownOctane(
input: MarkdownInput,
options?: MarkdownOctaneOptions,
): OctaneNode[]Returns rendered Octane nodes without the fragment wrapper.
function renderBlockOctane(
node: BlockNode,
options?: MarkdownOctaneOptions,
key?: string,
): ElementDescriptorRenders one block node. key is available for custom tree composition; normal document rendering supplies deterministic positional keys.
function renderInlineOctane(
node: InlineNode,
options?: MarkdownOctaneOptions,
key?: string,
): OctaneNodeRenders one inline node.
See the Octane Guide for TSRX, component mapping, and SSR usage.