Skip to content

container()

ts
function container(
   type, 
   value, 
   title?): Node;

Defined in: container.ts:30

Builder-element for a container

Parameters

ParameterTypeDescription
typestringType of this element
valuestring | NodeContent of this element
title?stringTitle of this element

Returns

Node

A markdown node

Example

ts
import { define, container } from "@ogs-gmbh/markdown";

const markdown = define(
 container("important", "I like this lib", "Important!")
);

console.assert(
  markdown.toString()
);

See

https://vitepress.dev/guide/markdown#custom-containers

Since

1.0.0

Author

Simon Kovtyk