← All Components
<mth-markdown>
Read-only Markdown renderer using @methane-ui/sanitize with safe URL validation and token synchronization.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-markdown>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/editor/markdown"></script>
<mth-markdown>Example</mth-markdown>import '@methane-ui/editor/markdown';
import '@methane-ui/react';
export function Example() {
return <mth-markdown>Example</mth-markdown>;
}<script setup lang="ts">
import '@methane-ui/editor/markdown';
</script>
<template>
<mth-markdown>Example</mth-markdown>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/editor/markdown';
import { MthMarkdownDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthMarkdownDirective],
template: `<mth-markdown>Example</mth-markdown>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/editor/markdown';
import MthMarkdown from '@methane-ui/svelte/MthMarkdown.svelte';
</script>
<MthMarkdown>Example</MthMarkdown>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
content | content | string | "" | content property. |
label | label | string | "" | label property. |
allowRawHtml | allow-raw-html | boolean | false | allowRawHtml property. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-render | { length: number } | Emitted event mth-render. |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(rendered). | Conformance suite |
| i18n | Routes 2 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |