Display HTML and Markdown

Display HTML

Use await div('') to display HTML.

// Name: Display HTML
import "@johnlindquist/kit"
await div(`<h1>Hello World</h1>`)

Open display-html in Script Kit

Display HTML with CSS

Script Kit bundles Tailwind CSS.

// Name: Display HTML with CSS
import "@johnlindquist/kit"
await div(
`<h1 class="p-10 text-4xl text-center">Hello World</h1>`

Open display-html-with-css in Script Kit

Display Markdown

The md() function will convert Markdown to HTML into HTML that you can pass into div. It will also add the default Tailwind styles so you won't have to think about formatting.

// Name: Display Markdown
import "@johnlindquist/kit"
let html = md(`# Hello World`)
await div(html)

Open display-markdown in Script Kit

Discuss Post