---
title: '@svartz/plugins/content'
description: The `@svartz/plugins/content` entry point.
updated_at: '2026-11-19T09:51:44+01:00'
---

# @svartz/plugins/content

## Types

- [ContentSlot](https://svartz.dev/reference/api/plugins/content/contentslot-type.md) — Which content slot (callout, code block, image, link, embed) renders each element of a note's HTML tree, the props that slot's component receives, and the attributes that survive sanitizing. The build compiles notes with it (`compileContent`), and `@svartz/ui` renders a preview in the browser with it, so both treat a tree the same way.

## Functions

- [activeContentSlot](https://svartz.dev/reference/api/plugins/content/activecontentslot.md) — The slot that renders `element` inside a tree, where `insideCode` says an ancestor is a code block's figure: the figure's own `<pre>` belongs to it, not to a slot of its own.
- [containsCode](https://svartz.dev/reference/api/plugins/content/containscode.md) — Whether `element`'s descendants are inside a code block, given whether `element` is.
- [contentProps](https://svartz.dev/reference/api/plugins/content/contentprops.md) — The props `slot`'s component gets for `element`, besides its children.
- [contentSlot](https://svartz.dev/reference/api/plugins/content/contentslot-function.md) — The slot that renders `element`, or `undefined` for plain markup.
- [isUnsafeElement](https://svartz.dev/reference/api/plugins/content/isunsafeelement.md) — Whether `element` is dropped, children and all.
- [runsCode](https://svartz.dev/reference/api/plugins/content/runscode.md) — Whether a browser would run `url` as a script or open it as an HTML document. Before it reads a URL's scheme, a browser drops the tabs and newlines anywhere in it and the spaces and control characters in front of it.
- [safeAttributes](https://svartz.dev/reference/api/plugins/content/safeattributes.md) — `element`'s HTML attributes without event handlers, `srcdoc`, or script and HTML-document URLs.

## Variables

- [VOID_TAGS](https://svartz.dev/reference/api/plugins/content/void_tags.md)
