> Markdown version of [Markdown](https://vaadin.com/docs/latest/it/components/markdown). Section index: [llms.txt](https://vaadin.com/docs/latest/it/components/llms.txt)

# Markdown

Il componente Markdown renderizza contenuto scritto nella sintassi Markdown come HTML. Supporta la formattazione di base del testo, elenchi, link, e altro. Tutto il contenuto fornito al componente viene sanitizzato internamente per impedire che venga renderizzato HTML potenzialmente pericoloso.

Per ulteriori informazioni sulle funzionalità comuni della sintassi Markdown, consulti la [Markdown Guide](https://www.markdownguide.org/basic-syntax/).

**Lit** — `markdown-basic.ts`

```html
const markdownText = `
## Rich Text Formatting

You can create **bold text**, *italicized text*, and \`inline code\` with simple Markdown syntax.
You can also ~~strike through~~ text when needed.

## Lists

### Ordered List:
1. First item
2. Second item
3. Third item with **bold text**

### Unordered List:
- Fruits
  - Apples 🍎
  - Bananas 🍌
  - Oranges 🍊
- Vegetables
  - Carrots
  - Broccoli

## Links & Quotes

> Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents.

[Visit Vaadin website](https://vaadin.com) | [Learn more about Markdown](https://www.markdownguide.org/)
    `;

    return html`<vaadin-markdown .content=${markdownText}></vaadin-markdown>`;
```

**Flow** — `MarkdownBasic.java`

```java
String markdownText = """
        ## Rich Text Formatting

        You can create **bold text**, *italicized text*, and `inline code` with simple Markdown syntax.
        You can also ~~strike through~~ text when needed.

        ## Lists

        ### Ordered List:
        1. First item
        2. Second item
        3. Third item with **bold text**

        ### Unordered List:
        - Fruits
            - Apples 🍎
            - Bananas 🍌
            - Oranges 🍊
        - Vegetables
            - Carrots
            - Broccoli

        ## Links & Quotes

        > Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents.

        [Visit Vaadin website](https://vaadin.com) | [Learn more about Markdown](https://www.markdownguide.org/)
        """;

Markdown markdown = new Markdown(markdownText);
add(markdown);
```

**React** — `markdown-basic.tsx`

```tsx
const markdownText = `
## Rich Text Formatting

You can create **bold text**, *italicized text*, and \`inline code\` with simple Markdown syntax.
You can also ~~strike through~~ text when needed.

## Lists

### Ordered List:
1. First item
2. Second item
3. Third item with **bold text**

### Unordered List:
- Fruits
  - Apples 🍎
  - Bananas 🍌
  - Oranges 🍊
- Vegetables
  - Carrots
  - Broccoli

## Links & Quotes

> Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents.

[Visit Vaadin website](https://vaadin.com) | [Learn more about Markdown](https://www.markdownguide.org/)
  `;

  return <Markdown>{markdownText}</Markdown>;
```

## <a id="interruzioni-di-riga"></a>Interruzioni di Riga (V25.3 pre-release)

Per impostazione predefinita, il componente segue la specifica Markdown originale: una singola interruzione di riga all’interno di un paragrafo viene compressa in uno spazio, ed è necessaria una riga vuota per iniziare un nuovo paragrafo. Abilitare l’opzione delle interruzioni di riga renderizza le singole interruzioni di riga (chiamate anche *soft breaks*) come vere interruzioni di riga, nel modo in cui tipicamente si comporta il Markdown in stile chat e messaggi. Le righe vuote avviano comunque un nuovo paragrafo.

**Lit** — `markdown-line-breaks.ts`

```typescript
Unresolved directive in <stdin> - include::../../../frontend/demo/component/markdown/markdown-line-breaks.ts[tags=snippet, indent=0]
```

**Flow** — `MarkdownLineBreaks.java`

```java
Unresolved directive in <stdin> - include::../../../src/main/java/com/vaadin/demo/component/markdown/MarkdownLineBreaks.java[tags=snippet, indent=0]
```

**React** — `markdown-line-breaks.tsx`

```tsx
Unresolved directive in <stdin> - include::../../../frontend/demo/component/markdown/react/markdown-line-breaks.tsx[tags=snippet, indent=0]
```

`77B51D28-FE42-4829-A315-D0F3C8A55BED`
