image()
ts
function image(source, alt?): Node;Defined in: image.ts:27
Builder-element for an image
Parameters
| Parameter | Type | Description |
|---|---|---|
source | string | Node | Source of the image |
alt? | string | Node | Alt-text of the image |
Returns
A markdown node
Example
ts
import { define, image } from "@ogs-gmbh/markdown";
const markdown = define(
image("https://example.com/image.png", "An example image")
);
console.assert(
markdown.toString()
);See
Since
1.0.0
Author
Simon Kovtyk