In the browser:
<link rel="stylesheet" href="./jess-components.css" />
<script defer src="./jess-components.min.js"></script>
A simple element that lets you create code examples easily. Requires prism.js and prism.css for best results.
For HTML this is very easy as you can just embed the entire html code and it will work out of the box:
<j-code language="html">
<div>
<span>I am an example</span>
</div>
</j-code>
For other things, like JavaScript you need to use the contents property:
<j-code
language="js"
contents="function HelloWorld() {\n sendMessage();\n};"
>
</j-code>
If you are using this for paid products and services please consider:
- Becoming a supporter on Patreon.com
- Doing a one time donation on Ko-Fi.
- If you want to donate but are not able to do so on these platforms, please contact us at www.pennions.com so we can provide an iDeal link.