Skip to content

raw()

Inject pre-built HTML into the DOM. Use for markdown output, third-party HTML, etc.

function raw(htmlString: string | (() => string)): WhisqNode
ParamTypeDescription
htmlStringstring | (() => string)HTML string (static or reactive)
import { raw, div, h1 } from "@whisq/core";
div({ class: "content" },
h1("My Post"),
raw(markdownToHtml(post.body)),
)