webviewSource.html
Creates an inline HTML source that renders an HTML string directly.
function html(content: string): WebviewSourceHtml
Parameters
| Parameter | Type | Description |
|---|---|---|
content | string | HTML string |
Returns
A WebviewSourceHtml object: { type: "html", content }.
Example
const source = webviewSource.html("<h1>Hello</h1>");
// { type: "html", content: "<h1>Hello</h1>" }