Skip to main content
ESC

HTML

Robindoc supports raw HTML in markdown, allowing you to embed custom components, HTML elements, and JSX directly in your documentation. HTML is processed through a specialized parser that integrates with Robindoc's component system and navigation.

Basic HTML 

You can use standard HTML elements directly in markdown:

<div class="custom-wrapper">
<p>This is custom HTML content.</p>
</div>

Result:

This is custom HTML content.

Custom Components 

Robindoc allows you to use custom React components through HTML syntax. Components must be registered in the components prop of the Page component. See Writing MD for more details.

<CustomComponent prop="value">
Child content
</CustomComponent>

Component Validation 

<!-- ✅ Correct -->
<MyComponent />

<!-- ❌ Incorrect - will show warning -->
<myComponent />
<my-component />

Robin Components 

For better integration with Robindoc's parsing system, use the Robin component syntax instead of raw HTML:

<!---robin MyComponent prop="value" /-->

This syntax provides:

HTML in Paragraphs 

When a paragraph contains only HTML tokens (and whitespace), Robindoc automatically treats it as raw HTML:

<CustomButton onClick={handleClick}>Click me</CustomButton>

This allows seamless mixing of markdown and HTML without explicit block syntax.

HTML <a> tags are automatically processed through Robindoc's link system:

<a href="./03-links.md">Internal Link</a>
<br>
<a href="https://example.com">External Link</a>

Result:

Internal Link
External Link 

Important Notes 

Tables
Return to navigation