@gijsbotje/md-to-prismic-richtext
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Markdown to Prismic RichText

For when you're importing a bunch of markdown into a prismic richtext field. Based on the import docs from Prismic.io.

Usage

yarn add @gijsbotje/md-to-prismic-richtext
// or
npm i @gijsbotje/md-to-prismic-richtext
import convert from '@gijsbotje/md-to-prismic-richtext';

const richText = convert(yourMarkdown);

// for example use prismic-dom to render
RichText.asHtml(richText);

Development

yarn test --watch

Big thanks to ueno-llc for creating markdown-to-prismic-richtext. This is a direct copy of that package, with a fix for code blocks.

/@gijsbotje/md-to-prismic-richtext/

    Package Sidebar

    Install

    npm i @gijsbotje/md-to-prismic-richtext

    Weekly Downloads

    1

    Version

    0.0.7

    License

    MIT

    Unpacked Size

    62.1 kB

    Total Files

    63

    Last publish

    Collaborators

    • gijsbotje