Skip to content

ansballard/prismd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prismd

This is a library-independent jsx component for rendering markdown, as well as highlighting code blocks within using prismjs

import { h, render } from "preact";
import "prismjs/themes/prism-okaidia.css";
import { Prismd } from "prismd/dist/prismd.preact.mjs";

const markdown = (
`# Hello!
_This is markdown, in a js codeblock, in a markdown file_
**is this meta enough?**
`);

render(<Prismd content={markdown} />, document.getElementById("root"));
import { h, render } from "preact";
import "prismjs/themes/prism-okaidia.css";
import { Prismd } from "prismd/dist/prismd.preact.mjs";

const markdown = (
`# Hello!
_This is markdown, in a js codeblock, in a markdown file_
**is this meta enough?**
`);

render(<Prismd content={markdown} />, document.getElementById("root"));

You can also use react via prismd.dist/prismd.react.mjs, or provide your own h and useCallback methods to prismd/dist/prismd.builder.mjs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published