Hi! I'm trying to implement the markdown editor in the default blog starter! Tried the plugin but it's throwing error!

7 replies
Last updated: Jan 25, 2021

Hi! I'm trying to implement the markdown editor in the default blog starter! Tried the plugin but it's throwing error!

Jan 24, 2021, 4:29 PM

Hi Subha! What error are you seeing?

Jan 24, 2021, 4:47 PM

Hi Subha! What error are you seeing?

Jan 24, 2021, 4:47 PM

Could you try running

npm install
before trying once more? And if that still doesn't work, could you verify that the plugin shows up in both your
package.json
file and your
sanity.json
file?

Jan 24, 2021, 5:29 PM

Do you see the plugin listed in your studio folder's

package.json
and
sanity.json
files?

Jan 25, 2021, 8:40 AM

If you cloned the entire starter repo (i.e. didn't create this from sanity.io/create ), you'll want to ensure to install the plugin in the

/template/studio
folder, not in the monorepo root. Could you try if installing it in your studio root folder adds the plugin to the files mentioned above?

Jan 25, 2021, 8:54 AM

Np! You might want to re-create the starter from sanity.io/create to avoid any confusion by our starter template setup - especially when it comes to deploying to production later. Do feel free to continue this way if you prefer though. We'll be here to clarify anything if needed πŸ™‚

Jan 25, 2021, 8:57 AM

Hi Subha, the markdown plugin takes care of markdown on the studio side, but not on the front-end side. You could try using this component for example: https://github.com/remarkjs/react-markdown πŸ™‚

Jan 25, 2021, 3:33 PM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.