# Serialize another element {#serializers}

Source: [Serialize another element | Yurich React editor API reference · Yurich](https://leeyujoo.com/yurich/api/serializers/)

Package: [`yurich`](https://www.npmjs.com/package/yurich)

Package version: `0.1.2`

```ts
import { toHTML, toJSON, Bold, Link } from 'yurich';

const html = toHTML(element, [Bold, Link]);
const json = toJSON(element, [Bold, Link]);
```

`toHTML` and `toJSON` apply the schema of the given extensions to an existing HTML element. Treat the returned JSON as immutable.

[HTML and JSON output](https://leeyujoo.com/yurich/features/html-and-json/) · [Extension fields](https://leeyujoo.com/yurich/extensions/reference/)
