@hjertnes/sanity-plugin-markdown

0.0.1 • Public • Published

sanity-plugin-markdown

A Markdown editor with preview for Sanity Studio. Supports Github flavored markdown and image uploads. You can either drag image(s) into the editor or click the bottom bar to bring up a file selector. The inserted image(s) has a default width crop in the url which you can change to your liking with the Sanity image pipeline parameters.

Installation

sanity install markdown

Usage

Declare a field in your schema to be markdown

const myDocument = {
  type: "document",
  name: "myDocument",
  fields: [
    {
      type: "markdown",
      description: "A Github flavored markdown field with image uploading",
      name: "bio"
    }
  ]
}

Demo

demo

License

MIT © Sanity.io See LICENSE

Package Sidebar

Install

npm i @hjertnes/sanity-plugin-markdown

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

22.8 kB

Total Files

14

Last publish

Collaborators

  • ehjertnes