# Angular Markdown Component

Markdown renders GitHub flavoured Markdown, from a static text or an AI answer streamed token by token: tables, task lists, highlighted code blocks with a copy button and line numbers, heading anchors and a table of contents. It runs during server-side rendering, without dependency, and its output is sanitized.

## Basic

Markdown renders the Markdown text of value : headings, paragraphs, emphasis, links, images, lists, blockquotes, rules and code. It is rendered with Angular templates rather than an HTML string, so the text can not inject markup.

```typescript
import { Component } from '@angular/core';
import { MarkdownModule } from '@exhaustive-ui/core/markdown';

@Component({
    template: `
        <div class="card">
            <p-markdown [value]="text" />
        </div>
    `,
    standalone: true,
    imports: [MarkdownModule]
})
export class MarkdownBasicDemo {
    text = [
        '## Release notes',
        '',
        'This release makes the **dashboard** faster and adds an *export* button. Read the [update guide](https://exhaustive-ui.com/migration/update) before you update.',
        '',
        '- Charts load in half the time',
        '- Tables remember their sort order',
        '- The `export` command writes CSV and JSON',
        '',
        '> Settings saved in the previous version are kept.',
        '',
        '---',
        '',
        '1. Update the package',
        '2. Run the migrations',
        '3. Restart the server'
    ].join('\n');
}
```

## GitHub Flavored Markdown

The GitHub flavoured Markdown extensions are supported: tables with column alignment, task lists rendered as disabled checkboxes, strikethrough with ~~text~~ and links found in the text, such as www.example.com or an email address. Set breaks to render every line break of a paragraph, as in GitHub comments and chat messages.

```typescript
import { Component } from '@angular/core';
import { MarkdownModule } from '@exhaustive-ui/core/markdown';

@Component({
    template: `
        <div class="card">
            <p-markdown [value]="text" />
        </div>
    `,
    standalone: true,
    imports: [MarkdownModule]
})
export class MarkdownGfmDemo {
    text = [
        '| Plan | Seats | Price |',
        '| :--- | :---: | ---: |',
        '| Starter | 3 | $0 |',
        '| Team | 20 | $49 |',
        '| Business | Unlimited | $199 |',
        '',
        '- [x] Write the specification',
        '- [x] Build the prototype',
        '- [ ] ~~Hire a designer~~ Use the design tokens',
        '- [ ] Ship it',
        '',
        'Questions? Write to support@example.com or visit www.example.com.'
    ].join('\n');
}
```

## Code Blocks

A fenced code block shows its language and a Copy button, which copies the code, shows Copied for two seconds, announces it to screen readers and emits onCopy . Hide the button with [copyButton]="false" and show line numbers with lineNumbers . The highlighter input, or provideMarkdownHighlighter for the whole application, highlights the code in the browser. highlightJs loads highlight.js on the first code block; any function that returns HTML for a code and a language works too, synchronous or asynchronous, and its HTML is sanitized. The colors come from the markdown.highlight design tokens, so no highlight.js stylesheet is needed and the light and dark schemes both meet the WCAG AA contrast ratio.

```typescript
import { Component, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { highlightJs, MarkdownModule } from '@exhaustive-ui/core/markdown';
import { ToggleSwitchModule } from '@exhaustive-ui/core/toggleswitch';

@Component({
    template: `
        <div class="card flex flex-col gap-4">
            <div class="flex items-center gap-2">
                <p-toggle-switch [(ngModel)]="lineNumbers" inputId="md-line-numbers" />
                <label for="md-line-numbers">Line numbers</label>
            </div>
            <p-markdown [value]="text" [highlighter]="highlighter" [lineNumbers]="lineNumbers()" />
        </div>
    `,
    standalone: true,
    imports: [MarkdownModule, ToggleSwitchModule, FormsModule]
})
export class MarkdownCodeDemo {
    lineNumbers = signal(false);

    highlighter = highlightJs(() => import('highlight.js/lib/common'));

    text = [
        'Fetch the open orders and total them:',
        '',
        '```ts',
        "import { inject, resource } from '@angular/core';",
        '',
        'interface Order {',
        '    id: number;',
        '    total: number; // in cents',
        '}',
        '',
        'export class OrdersService {',
        '    private readonly url = `/api/orders?status=open`;',
        '',
        '    readonly orders = resource({',
        '        loader: async () => (await fetch(this.url)).json() as Promise<Order[]>',
        '    });',
        '}',
        '```',
        '',
        'Then style the list:',
        '',
        '```css',
        '.orders > li:nth-child(odd) {',
        '    background: var(--p-content-hover-background);',
        '    padding: 0.5rem 1rem;',
        '}',
        '```',
        '',
        '```diff',
        '- const total = orders.reduce((sum, o) => sum + o.total);',
        '+ const total = orders.reduce((sum, o) => sum + o.total, 0);',
        '```'
    ].join('\n');
}
```

## Streaming

An AI answer arrives token by token: append each token to value and set streaming until the last one. Markdown closes provisionally what is still open at the end of the text, so the reader never sees a stray ** , a half written link or a table row as plain text: emphasis and code spans are closed, a link shows its text until its URL is complete, an image appears once its URL is complete, a table shows as soon as its header row is written, and a code block grows inside its frame. A caret follows the last character and the root has aria-busy . Each top level block keeps its object and its DOM while its source does not change, so only the block being written is rendered again: an answer of any length stays cheap to update. When streaming turns off, the text is rendered exactly as written.

```typescript
import { Component, DestroyRef, inject, signal } from '@angular/core';
import { ButtonModule } from '@exhaustive-ui/core/button';
import { highlightJs, MarkdownModule } from '@exhaustive-ui/core/markdown';
import { replay, stop as stopIcon } from '@exhaustive-ui/icons/round';

@Component({
    template: `
        <div class="card flex flex-col gap-4">
            <div class="flex flex-wrap items-center gap-3">
                <p-button [label]="streaming() ? 'Stop' : 'Replay the answer'" [icon]="streaming() ? stopIcon : replay" size="small" (onClick)="streaming() ? stop() : start()" />
                <span class="text-sm text-muted-color">{{ streaming() ? 'Generating…' : 'Answer complete' }}</span>
            </div>
            <div class="p-4 rounded-border border border-surface">
                <p-markdown [value]="value()" [streaming]="streaming()" [highlighter]="highlighter" linkTarget="_blank" />
            </div>
        </div>
    `,
    standalone: true,
    imports: [MarkdownModule, ButtonModule]
})
export class MarkdownStreamingDemo {
    stopIcon = stopIcon;
    replay = replay;
    readonly answer = [
        'Here is how to **debounce** a search box with Angular signals.',
        '',
        '1. Keep the query in a `signal`',
        '2. Derive a debounced value with a `resource`',
        '3. Show the results with `@for`',
        '',
        '```ts',
        "import { signal, resource } from '@angular/core';",
        '',
        "query = signal('');",
        '',
        'results = resource({',
        '    params: () => this.query(),',
        '    loader: async ({ params, abortSignal }) => {',
        '        await new Promise((r) => setTimeout(r, 300));',
        '        const response = await fetch(`/api/search?q=${params}`, { signal: abortSignal });',
        '        return response.json();',
        '    }',
        '});',
        '```',
        '',
        '| Approach | Cancels stale requests | Lines |',
        '| --- | :---: | ---: |',
        '| `resource` | Yes | 9 |',
        '| RxJS `switchMap` | Yes | 12 |',
        '| `setTimeout` only | No | 6 |',
        '',
        '> The `abortSignal` cancels the request when the query changes.',
        '',
        'See the [Angular documentation](https://angular.dev/guide/signals/resource) for more.'
    ].join('\n');

    readonly value = signal(this.answer);

    readonly streaming = signal(false);

    highlighter = highlightJs(() => import('highlight.js/lib/common'));

    private timer?: ReturnType<typeof setInterval>;

    constructor() {
        inject(DestroyRef).onDestroy(() => clearInterval(this.timer));
    }

    start() {
        this.stop();
        let index = 0;
        this.value.set('');
        this.streaming.set(true);
        this.timer = setInterval(() => {
            // a token is a few characters, as with a language model
            index = Math.min(this.answer.length, index + 2 + Math.floor(Math.random() * 5));
            this.value.set(this.answer.slice(0, index));
            if (index >= this.answer.length) {
                this.stop();
            }
        }, 30);
    }

    stop() {
        clearInterval(this.timer);
        this.timer = undefined;
        this.streaming.set(false);
    }
}
```

## Security and HTML

Markdown is safe to render from users or language models. The text is never parsed as HTML: raw HTML is shown as text, and only the http , https , mailto , tel and relative URLs are kept for links, plus images in data URLs. A link with any other URL, such as javascript: , is rendered as its text. Set allowHtml to render the raw HTML of trusted content. It still goes through the Angular sanitizer, which removes scripts, event handlers and unsafe URLs. linkTarget opens the links to other sites in a new tab; they get rel="noopener noreferrer" , which linkRel changes. urlTransform rewrites or removes a URL after the built-in check, here to remove the images of other sites.

```typescript
import { Component } from '@angular/core';
import { MarkdownModule, MarkdownUrlTransform } from '@exhaustive-ui/core/markdown';

@Component({
    template: `
        <div class="card grid grid-cols-1 md:grid-cols-2 gap-6">
            <div class="flex flex-col gap-2 min-w-0">
                <span class="font-semibold">Default</span>
                <p-markdown [value]="text" linkTarget="_blank" [urlTransform]="sameSiteImages" />
            </div>
            <div class="flex flex-col gap-2 min-w-0">
                <span class="font-semibold">allowHtml</span>
                <p-markdown [value]="text" allowHtml linkTarget="_blank" [urlTransform]="sameSiteImages" />
            </div>
        </div>
    `,
    standalone: true,
    imports: [MarkdownModule]
})
export class MarkdownSecurityDemo {
    text = [
        'Press <kbd>Ctrl</kbd> + <kbd>K</kbd> to search.',
        '',
        '<details><summary>More</summary>Hidden until opened.</details>',
        '',
        '<b onmouseover="alert(1)">Bold</b>, [a script link](javascript:alert(1)) and [the docs](https://exhaustive-ui.com).',
        '',
        '![External image](https://example.com/tracker.png)'
    ].join('\n');

    sameSiteImages: MarkdownUrlTransform = (url, kind) => (kind === 'image' && /^(https?:)?\/\//.test(url) ? null : url);
}
```

## Headings and Table of Contents

headingAnchors gives the top level headings an id built from their text, such as install-the-cli , and a link to themselves shown on hover and focus. headingIds sets the ids without the links, and headingIdPrefix keeps them unique when a page shows several documents. onHeadingsChange emits the headings with their id, text and level whenever they change, also while the text streams, to build a table of contents; the headings signal gives the same list. scrollTo scrolls to a heading and moves the focus to it, and links to an anchor of the document do the same.

```typescript
import { Component, signal } from '@angular/core';
import { MarkdownHeading, MarkdownModule } from '@exhaustive-ui/core/markdown';

@Component({
    template: `
        <div class="card flex flex-col md:flex-row gap-6">
            <nav class="md:w-56 shrink-0" aria-labelledby="md-toc-title">
                <span id="md-toc-title" class="font-semibold block mb-2">Contents</span>
                <ul class="list-none p-0 m-0 flex flex-col gap-1">
                    @for (heading of headings(); track heading.id) {
                        <li [style.padding-inline-start.rem]="(heading.level - 2) * 1">
                            <a [href]="'#' + heading.id" class="inline-flex min-h-6 items-center text-primary hover:underline" (click)="$event.preventDefault(); markdown.scrollTo(heading.id)">{{ heading.text }}</a>
                        </li>
                    }
                </ul>
            </nav>
            <p-markdown #markdown class="flex-1 min-w-0" [value]="text" headingAnchors headingIdPrefix="guide-" (onHeadingsChange)="headings.set($event)" />
        </div>
    `,
    standalone: true,
    imports: [MarkdownModule]
})
export class MarkdownHeadingsDemo {
    headings = signal<MarkdownHeading[]>([]);

    text = [
        '## Install the CLI',
        '',
        'Install the command line tool globally with your package manager.',
        '',
        '## Create a project',
        '',
        'Run `create` in an empty folder and answer the questions.',
        '',
        '### Choose a template',
        '',
        'The minimal template has no router; the full template adds routing and server-side rendering.',
        '',
        '### Pick a theme',
        '',
        'Every preset has a light and a dark color scheme.',
        '',
        '## Deploy',
        '',
        'Build the project and upload the `dist` folder. Go back to [Install the CLI](#guide-install-the-cli) to update it.'
    ].join('\n');
}
```

## Template

The code template replaces the code blocks of the languages listed in codeTemplateLanguages , or every code block when it is not set, to render a diagram, a chart or a custom frame. It receives the code, its language , a closed flag that is false while the block is still streaming, the highlighted HTML and a copy function that copies and announces the code. The link template receives the href , the text , the title and an external flag, and the image template the src , the alt text and the title .

```typescript
import { Component } from '@angular/core';
import { ButtonModule } from '@exhaustive-ui/core/button';
import { MarkdownModule } from '@exhaustive-ui/core/markdown';
import { copy as copyIcon, externalLink } from '@exhaustive-ui/icons/round';
import { SvgIcon } from '@exhaustive-ui/core/icon';

@Component({
    template: `
        <div class="card">
            <p-markdown [value]="text" [codeTemplateLanguages]="['shell']">
                <ng-template #code let-code let-copy="copy">
                    <div class="flex items-center gap-3 p-3 rounded-border bg-surface-950 text-surface-0 font-mono text-sm">
                        <span aria-hidden="true" class="text-surface-400">$</span>
                        <span class="flex-1 overflow-x-auto whitespace-pre">{{ code }}</span>
                        <p-button [icon]="copyIcon" [text]="true" severity="contrast" size="small" ariaLabel="Copy command" (onClick)="copy()" />
                    </div>
                </ng-template>
                <ng-template #link let-href let-text="text" let-external="external">
                    <a [href]="href" class="text-primary underline" [attr.target]="external ? '_blank' : null" [attr.rel]="external ? 'noopener noreferrer' : null"
                        >{{ text }}
                        @if (external) {
                            <svg pIcon [icon]="externalLink" class="text-xs" aria-hidden="true"></svg><span class="sr-only"> (opens in a new tab)</span>
                        }
                    </a>
                </ng-template>
                <ng-template #image let-src let-alt="alt" let-title="title">
                    <figure class="m-0 inline-flex flex-col gap-2">
                        <img [src]="src" [alt]="alt" class="rounded-border max-w-full" width="160" height="90" />
                        @if (title) {
                            <figcaption class="text-sm text-muted-color">{{ title }}</figcaption>
                        }
                    </figure>
                </ng-template>
            </p-markdown>
        </div>
    `,
    standalone: true,
    imports: [SvgIcon, MarkdownModule, ButtonModule]
})
export class MarkdownTemplateDemo {
    copyIcon = copyIcon;
    externalLink = externalLink;

    text = [
        'Install the package:',
        '',
        '```shell',
        'npm install @exhaustive-ui/core @exhaustive-ui/themes',
        '```',
        '',
        'Then read the [installation guide](https://exhaustive-ui.com/installation) or the [theming page](/theming/styled).',
        '',
        '![Galleria thumbnail](/demo/galleria/galleria1s.jpg "A thumbnail with a caption")',
        '',
        '```ts',
        "import { Markdown } from '@exhaustive-ui/core/markdown';",
        '```'
    ].join('\n');
}
```

## Accessibility

Screen Reader Markdown renders native elements: headings h1 to h6 , paragraphs, ul and ol lists, blockquotes, table with th scope="col" header cells, img with the alt text of the Markdown, and pre and code for code. Keep the heading levels of the document in line with the page, for example by starting the Markdown at level 2. A task list item has a disabled checkbox, checked or not, labelled by the text of the item with aria-labelledby . An image with an unsafe URL is replaced by its alt text, and a link with an unsafe URL by its text. A wide table sits in a scrollable container with the group role, named "Table", that can be focused to scroll it with the keyboard; a code block can be focused for the same reason. The copy button of a code block shows Copy and is named "Copy ts code" or "Copy code", which starts with its visible text; once the code is copied it shows and is named Copied , and a polite live region announces "Code copied to the clipboard". The link next to a heading is named "Link to section" followed by the heading, and its visible # is hidden from screen readers. Links to other sites keep their text, and linkTarget should come with a visible hint when it opens a new tab, which the link template can add. While streaming is on, the root has aria-busy="true" and the caret is hidden from screen readers. The text is not announced token by token: announce the complete answer, or a short status such as "Answer ready", in a live region of the application once streaming ends. Translate every text with labels .

```typescript
<p-markdown [value]="answer()" [streaming]="streaming()" />
<span class="sr-only" aria-live="polite">{{ streaming() ? '' : 'Answer ready' }}</span>
```

## Markdown

Markdown renders GitHub flavoured Markdown, from a static text or an AI answer streamed token by token: tables, task lists, code blocks with highlighting, line numbers and a copy button, heading anchors and a table of contents. The output is rendered with Angular templates and sanitized.

### Props

| Name | Type | Default | Description |
|------|------|---------|-------------|
| dt | Object | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
| pt | MarkdownPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
| value | string | '' | The Markdown text. |
| streaming | boolean | false | Whether the text is still being written, such as an AI answer arriving token by token. Unclosed emphasis, code spans, links and tables at the end are closed provisionally, a caret follows the last character and the root is aria-busy. |
| allowHtml | boolean | false | Whether raw HTML in the Markdown is rendered. It is sanitized by Angular: scripts, event handlers and javascript URLs are removed. When false, raw HTML is shown as text. |
| breaks | boolean | false | Whether a single line break in a paragraph is rendered as a line break, as in GitHub comments and chat messages. |
| linkTarget | string | - | Target of the links to other sites, such as  `_blank` . Relative links and anchors are not affected. |
| linkRel | string | 'noopener noreferrer' | Rel attribute of the links to other sites. |
| urlTransform | MarkdownUrlTransform | - | Rewrites or removes the URLs of the links and images, after the built-in check that only keeps http, https, mailto, tel and relative URLs. |
| headingIds | boolean | false | Whether the top level headings have an id, built from their text. |
| headingAnchors | boolean | false | Whether the top level headings have an id and a link to themselves, shown on hover and focus. |
| headingIdPrefix | string | '' | Prefix of the heading ids, to keep them unique when a page shows several documents. |
| copyButton | boolean | true | Whether code blocks have a copy button. |
| lineNumbers | boolean | false | Whether code blocks show line numbers. |
| highlight | boolean | true | Whether code blocks are highlighted, with the highlighter input or the one given with provideMarkdownHighlighter. |
| highlighter | MarkdownHighlighter | - | Highlights the code blocks, called in the browser only. Use  `highlightJs(() => import('highlight.js/lib/common'))`  to load highlight.js on the first code block. |
| codeTemplateLanguages | string[] | - | Languages of the code blocks rendered with the code template, such as  `['mermaid']` . When not set, the code template renders every code block. |
| labels | Partial<MarkdownLabels> | - | Texts of the component, merged with the default ones. |

### Emits

| Name | Parameters | Description |
|------|------------|-------------|
| onHeadingsChange | value: MarkdownHeading[] | Callback to invoke when the top level headings change, with their ids, texts and levels, to build a table of contents. |
| onCopy | event: MarkdownCopyEvent | Callback to invoke when the code of a code block is copied. |

### Templates

| Name | Type | Description |
|------|------|-------------|
| code | TemplateRef<MarkdownCodeTemplateContext> | Custom code block template. |
| link | TemplateRef<MarkdownLinkTemplateContext> | Custom link template. |
| image | TemplateRef<MarkdownImageTemplateContext> | Custom image template. |

### Methods

| Name | Parameters | Return Type | Description |
|------|------------|-------------|-------------|
| scrollTo | id: string | void | Scrolls to the element with the given id, such as a heading, moves the focus to it and updates the hash of the URL. |

## Pass Through Options

| Name | Type | Description |
|------|------|-------------|
| root | PassThroughOption<HTMLElement, I> | Used to pass attributes to the root's DOM element. |
| heading | PassThroughOption<HTMLHeadingElement, I> | Used to pass attributes to the heading elements, h1 to h6. |
| anchor | PassThroughOption<HTMLAnchorElement, I> | Used to pass attributes to the link that points to a heading. |
| paragraph | PassThroughOption<HTMLParagraphElement, I> | Used to pass attributes to the paragraph elements. |
| link | PassThroughOption<HTMLAnchorElement, I> | Used to pass attributes to the links. |
| image | PassThroughOption<HTMLImageElement, I> | Used to pass attributes to the images. |
| list | PassThroughOption<HTMLOListElement \| HTMLUListElement, I> | Used to pass attributes to the bulleted and numbered lists. |
| listItem | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the list items. |
| taskCheckbox | PassThroughOption<HTMLInputElement, I> | Used to pass attributes to the checkbox of a task list item. |
| blockquote | PassThroughOption<HTMLQuoteElement, I> | Used to pass attributes to the blockquotes. |
| tableContainer | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the scrollable region around a table. |
| table | PassThroughOption<HTMLTableElement, I> | Used to pass attributes to the tables. |
| tableHeaderCell | PassThroughOption<HTMLTableCellElement, I> | Used to pass attributes to the header cells of the tables. |
| tableCell | PassThroughOption<HTMLTableCellElement, I> | Used to pass attributes to the body cells of the tables. |
| codeBlock | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the container of a code block. |
| codeHeader | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the header of a code block, with the language and the copy button. |
| codeLanguage | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the language label of a code block. |
| copyButton | PassThroughOption<HTMLButtonElement, I> | Used to pass attributes to the copy button of a code block. |
| lineNumbers | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the line numbers of a code block. |
| pre | PassThroughOption<HTMLPreElement, I> | Used to pass attributes to the pre element of a code block. |
| inlineCode | PassThroughOption<HTMLElement, I> | Used to pass attributes to the inline code elements. |
| separator | PassThroughOption<HTMLHRElement, I> | Used to pass attributes to the horizontal rules. |
| caret | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the caret shown while the text is streaming. |

## Theming

### CSS Classes

| Class | Description |
|-------|-------------|
| p-markdown | Class name of the root element |
| p-markdown-streaming | Class name of the root element while the text is streaming |
| p-markdown-heading | Class name of the heading elements |
| p-markdown-anchor | Class name of the link to a heading |
| p-markdown-paragraph | Class name of the paragraph elements |
| p-markdown-link | Class name of the links |
| p-markdown-image | Class name of the images |
| p-markdown-list | Class name of the lists |
| p-markdown-list-item | Class name of the list items |
| p-markdown-task-checkbox | Class name of the checkbox of a task item |
| p-markdown-blockquote | Class name of the blockquotes |
| p-markdown-table-container | Class name of the scrollable region around a table |
| p-markdown-table | Class name of the tables |
| p-markdown-code-block | Class name of the code blocks |
| p-markdown-code-header | Class name of the header of a code block |
| p-markdown-code-language | Class name of the language of a code block |
| p-markdown-copy-button | Class name of the copy button |
| p-markdown-pre | Class name of the pre element of a code block |
| p-markdown-line-numbers-gutter | Class name of the line numbers of a code block |
| p-markdown-inline-code | Class name of the inline code elements |
| p-markdown-separator | Class name of the horizontal rules |
| p-markdown-caret | Class name of the caret shown while the text is streaming |

### Design Tokens

| Token | CSS Variable | Description |
|-------|--------------|-------------|
| markdown.color | --p-markdown-color | Text color |
| markdown.line.height | --p-markdown-line-height | Line height of the text |
| markdown.gap | --p-markdown-gap | Space between blocks |
| markdown.heading.color | --p-markdown-heading-color | Color of the headings |
| markdown.heading.font.weight | --p-markdown-heading-font-weight | Font weight of the headings |
| markdown.heading.line.height | --p-markdown-heading-line-height | Line height of the headings |
| markdown.heading.margin.top | --p-markdown-heading-margin-top | Additional space above the headings |
| markdown.heading.h1.font.size | --p-markdown-heading-h1-font-size | Font size of a heading 1 |
| markdown.heading.h2.font.size | --p-markdown-heading-h2-font-size | Font size of a heading 2 |
| markdown.heading.h3.font.size | --p-markdown-heading-h3-font-size | Font size of a heading 3 |
| markdown.heading.h4.font.size | --p-markdown-heading-h4-font-size | Font size of a heading 4 |
| markdown.heading.h5.font.size | --p-markdown-heading-h5-font-size | Font size of a heading 5 |
| markdown.heading.h6.font.size | --p-markdown-heading-h6-font-size | Font size of a heading 6 |
| markdown.anchor.color | --p-markdown-anchor-color | Color of the link next to a heading |
| markdown.anchor.hover.color | --p-markdown-anchor-hover-color | Color of the hovered link next to a heading |
| markdown.anchor.gap | --p-markdown-anchor-gap | Space between a heading and its link |
| markdown.anchor.focus.ring.width | --p-markdown-anchor-focus-ring-width | Focus ring width of the link next to a heading |
| markdown.anchor.focus.ring.style | --p-markdown-anchor-focus-ring-style | Focus ring style of the link next to a heading |
| markdown.anchor.focus.ring.color | --p-markdown-anchor-focus-ring-color | Focus ring color of the link next to a heading |
| markdown.anchor.focus.ring.offset | --p-markdown-anchor-focus-ring-offset | Focus ring offset of the link next to a heading |
| markdown.anchor.focus.ring.shadow | --p-markdown-anchor-focus-ring-shadow | Focus ring shadow of the link next to a heading |
| markdown.link.color | --p-markdown-link-color | Color of the links |
| markdown.link.hover.color | --p-markdown-link-hover-color | Color of the hovered links |
| markdown.link.text.decoration | --p-markdown-link-text-decoration | Text decoration of the links |
| markdown.link.focus.ring.width | --p-markdown-link-focus-ring-width | Focus ring width of a link |
| markdown.link.focus.ring.style | --p-markdown-link-focus-ring-style | Focus ring style of a link |
| markdown.link.focus.ring.color | --p-markdown-link-focus-ring-color | Focus ring color of a link |
| markdown.link.focus.ring.offset | --p-markdown-link-focus-ring-offset | Focus ring offset of a link |
| markdown.link.focus.ring.shadow | --p-markdown-link-focus-ring-shadow | Focus ring shadow of a link |
| markdown.list.indent | --p-markdown-list-indent | Indentation of the lists |
| markdown.list.item.gap | --p-markdown-list-item-gap | Space between list items |
| markdown.task.checkbox.accent.color | --p-markdown-task-checkbox-accent-color | Accent color of the checkbox of a task item |
| markdown.task.checkbox.gap | --p-markdown-task-checkbox-gap | Space between the checkbox of a task item and its text |
| markdown.blockquote.color | --p-markdown-blockquote-color | Text color of the blockquotes |
| markdown.blockquote.border.width | --p-markdown-blockquote-border-width | Border width of the blockquotes |
| markdown.blockquote.border.color | --p-markdown-blockquote-border-color | Border color of the blockquotes |
| markdown.blockquote.padding | --p-markdown-blockquote-padding | Padding of the blockquotes |
| markdown.table.border.color | --p-markdown-table-border-color | Border color of the tables |
| markdown.table.cell.padding | --p-markdown-table-cell-padding | Padding of the table cells |
| markdown.table.header.color | --p-markdown-table-header-color | Text color of the header cells |
| markdown.table.header.font.weight | --p-markdown-table-header-font-weight | Font weight of the header cells |
| markdown.table.header.background | --p-markdown-table-header-background | Background of the header cells |
| markdown.table.striped.background | --p-markdown-table-striped-background | Background of the even rows |
| markdown.table.border.radius | --p-markdown-table-border-radius | Border radius of the scrollable region around a table |
| markdown.table.focus.ring.width | --p-markdown-table-focus-ring-width | Focus ring width of the scrollable region around a table |
| markdown.table.focus.ring.style | --p-markdown-table-focus-ring-style | Focus ring style of the scrollable region around a table |
| markdown.table.focus.ring.color | --p-markdown-table-focus-ring-color | Focus ring color of the scrollable region around a table |
| markdown.table.focus.ring.offset | --p-markdown-table-focus-ring-offset | Focus ring offset of the scrollable region around a table |
| markdown.table.focus.ring.shadow | --p-markdown-table-focus-ring-shadow | Focus ring shadow of the scrollable region around a table |
| markdown.code.font.family | --p-markdown-code-font-family | Font family of the code |
| markdown.code.font.size | --p-markdown-code-font-size | Font size of the inline code |
| markdown.code.padding | --p-markdown-code-padding | Padding of the inline code |
| markdown.code.border.radius | --p-markdown-code-border-radius | Border radius of the inline code |
| markdown.code.background | --p-markdown-code-background | Background of the inline code |
| markdown.code.color | --p-markdown-code-color | Text color of the inline code |
| markdown.code.block.background | --p-markdown-code-block-background | Background of the code blocks |
| markdown.code.block.color | --p-markdown-code-block-color | Text color of the code blocks |
| markdown.code.block.border.color | --p-markdown-code-block-border-color | Border color of the code blocks |
| markdown.code.block.border.radius | --p-markdown-code-block-border-radius | Border radius of the code blocks |
| markdown.code.block.padding | --p-markdown-code-block-padding | Padding of the code of a code block |
| markdown.code.block.font.size | --p-markdown-code-block-font-size | Font size of the code blocks |
| markdown.code.block.line.height | --p-markdown-code-block-line-height | Line height of the code blocks |
| markdown.code.block.focus.ring.width | --p-markdown-code-block-focus-ring-width | Focus ring width of the code of a code block |
| markdown.code.block.focus.ring.style | --p-markdown-code-block-focus-ring-style | Focus ring style of the code of a code block |
| markdown.code.block.focus.ring.color | --p-markdown-code-block-focus-ring-color | Focus ring color of the code of a code block |
| markdown.code.block.focus.ring.offset | --p-markdown-code-block-focus-ring-offset | Focus ring offset of the code of a code block |
| markdown.code.block.focus.ring.shadow | --p-markdown-code-block-focus-ring-shadow | Focus ring shadow of the code of a code block |
| markdown.code.header.background | --p-markdown-code-header-background | Background of the header of a code block |
| markdown.code.header.color | --p-markdown-code-header-color | Text color of the header of a code block |
| markdown.code.header.border.color | --p-markdown-code-header-border-color | Border color between the header and the code |
| markdown.code.header.padding | --p-markdown-code-header-padding | Padding of the header of a code block |
| markdown.code.header.font.size | --p-markdown-code-header-font-size | Font size of the header of a code block |
| markdown.code.header.gap | --p-markdown-code-header-gap | Space between the language and the copy button |
| markdown.copy.button.color | --p-markdown-copy-button-color | Color of the copy button |
| markdown.copy.button.hover.color | --p-markdown-copy-button-hover-color | Color of the hovered copy button |
| markdown.copy.button.hover.background | --p-markdown-copy-button-hover-background | Background of the hovered copy button |
| markdown.copy.button.copied.color | --p-markdown-copy-button-copied-color | Color of the copy button once the code is copied |
| markdown.copy.button.padding | --p-markdown-copy-button-padding | Padding of the copy button |
| markdown.copy.button.border.radius | --p-markdown-copy-button-border-radius | Border radius of the copy button |
| markdown.copy.button.gap | --p-markdown-copy-button-gap | Space between the icon and the text of the copy button |
| markdown.copy.button.icon.size | --p-markdown-copy-button-icon-size | Size of the icon of the copy button |
| markdown.copy.button.focus.ring.width | --p-markdown-copy-button-focus-ring-width | Focus ring width of the copy button |
| markdown.copy.button.focus.ring.style | --p-markdown-copy-button-focus-ring-style | Focus ring style of the copy button |
| markdown.copy.button.focus.ring.color | --p-markdown-copy-button-focus-ring-color | Focus ring color of the copy button |
| markdown.copy.button.focus.ring.offset | --p-markdown-copy-button-focus-ring-offset | Focus ring offset of the copy button |
| markdown.copy.button.focus.ring.shadow | --p-markdown-copy-button-focus-ring-shadow | Focus ring shadow of the copy button |
| markdown.line.numbers.color | --p-markdown-line-numbers-color | Color of the line numbers |
| markdown.line.numbers.gap | --p-markdown-line-numbers-gap | Space between the line numbers and the code |
| markdown.highlight.keyword | --p-markdown-highlight-keyword | Color of the keywords in highlighted code |
| markdown.highlight.string | --p-markdown-highlight-string | Color of the strings and regular expressions in highlighted code |
| markdown.highlight.number | --p-markdown-highlight-number | Color of the numbers and literals in highlighted code |
| markdown.highlight.comment | --p-markdown-highlight-comment | Color of the comments in highlighted code |
| markdown.highlight.title | --p-markdown-highlight-title | Color of the function names and titles in highlighted code |
| markdown.highlight.type | --p-markdown-highlight-type | Color of the types, classes and built-ins in highlighted code |
| markdown.highlight.attribute | --p-markdown-highlight-attribute | Color of the attributes and properties in highlighted code |
| markdown.highlight.variable | --p-markdown-highlight-variable | Color of the variables and parameters in highlighted code |
| markdown.highlight.tag | --p-markdown-highlight-tag | Color of the tags and selectors in highlighted code |
| markdown.highlight.meta | --p-markdown-highlight-meta | Color of the punctuation and meta information in highlighted code |
| markdown.highlight.addition | --p-markdown-highlight-addition | Color of the added lines in highlighted code |
| markdown.highlight.addition.background | --p-markdown-highlight-addition-background | Background of the added lines in highlighted code |
| markdown.highlight.deletion | --p-markdown-highlight-deletion | Color of the removed lines in highlighted code |
| markdown.highlight.deletion.background | --p-markdown-highlight-deletion-background | Background of the removed lines in highlighted code |
| markdown.separator.border.color | --p-markdown-separator-border-color | Color of the horizontal rules |
| markdown.separator.border.width | --p-markdown-separator-border-width | Width of the horizontal rules |
| markdown.image.border.radius | --p-markdown-image-border-radius | Border radius of the images |
| markdown.caret.color | --p-markdown-caret-color | Color of the caret shown while the text is streaming |
| markdown.caret.width | --p-markdown-caret-width | Width of the caret shown while the text is streaming |

