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 – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.