[**@wocart/theme v4.1.0**](../../README)

***

[@wocart/theme](../../README) / [index](../README) / richTextToHtml

# Function: richTextToHtml()

> **richTextToHtml**(`document`, `options?`): `string`

The document as HTML: `<p>`, `<h2>`–`<h4>`, `<ul>`/`<ol>`, `<strong>`, `<em>`,
`<u>`, `<s>`, `<a href>` and `<br>`, every text and attribute escaped. Nodes
outside the format and unsafe links are left out rather than trusted, so
the output is safe for Astro's `set:html` even for an unchecked value.

## Parameters

### document

[`RichTextDocument`](../type-aliases/RichTextDocument)

### options?

[`RichTextHtmlOptions`](../interfaces/RichTextHtmlOptions)

## Returns

`string`
