1.0.7 β€’ Published 3 years ago

sanity-plugin-mdide v1.0.7

Weekly downloads
46
License
ISC
Repository
github
Last release
3 years ago

Sanity-Plugin-MdIDE

This is a wrapper on React SimpleMDE Editor to be used on Sanity Studio

Installation πŸ“¦

sanity install sanity-plugin-mdide

Usage πŸš€

Just set type markdown to the field you wish to use.

// ./schemas/post.js

export default {
  name: 'post',
  title: 'Post',
  type: 'document',
  fields: [
    {
      name: 'body',
      title: 'Body',
      type: 'markdown',
    },
  ],
}

CSS customization 🎨

To fit well with Sanity Studioβ€˜s design system. These variables come from part:@sanity/base/theme/variables-style.

The list of CSS custom properties:

  • --body-text
  • --component-bg
  • --hairline-color
  • --border-radius-base
  • --brand-primary
  • --brand-secondary

This also allows to easily adapt to any color pallete.

Configuration Options πŸ”§

Just is a very thin wrapper on top of React SimpleMDE Editor and as such, it accepts every option EasyMDE supports. On your field schema, just pass an options object.

export default {
  name: 'post',
  title: 'Post',
  type: 'document',
  fields: [
    {
      name: 'body',
      title: 'Body',
      type: 'markdown',
      options: {
        minHeight: '400px', // default is 500px
      },
    },
  ],
}

Thanks πŸ™‡β€β™‚οΈ

1.0.2

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.1.0

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago