A web component used for code highlighting.
npm install x-postpress-codeA web component used for code highlighting. Try it out at JS BIN.
Use the type attribute and include the source in the default slot with pre tags to render static content:
``html`
#/usr/bin/env bash
for file in *; do
echo $file
done
Lazy load the content to be highlighted by using both the type and src attributes:
`html`
type="js"
>
`html`
src="https://unpkg.com/x-postpress-code"
type="module"
>
`bash`
npm i x-postpress-code
`js`
import 'x-postpress-code'
* bashc
* cpp
* css
* javascript
* json
* markdown
* php
* plaintext
* python
* shell
* typescript
* xml`
*