Skip to content

HtmlMarker

Defined in: packages/core/src/utils/html.ts:161

A string the author explicitly marked as raw HTML.

The shape a !html YAML tag resolves to. It is a structural marker — an object with a $html key — rather than a sniffed string, which is the distinction the trust model turns on: the format never decides “this looks like markup” by inspecting content. Whether the markup actually renders is gated at the sink by the capability policy, so the marker is only ever a request, never a grant.

JSON-serializable on purpose. It survives the <ml-map config="..."> attribute path and a round trip, and a YAML parser without the !html handler resolves the tag to the plain string instead — which then escapes, so an older or handler-less reader degrades to text rather than failing.

PropertyTypeDefined in
$htmlstringpackages/core/src/utils/html.ts:162