Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to integrate SimpleMDE into Nuxt.js? #821

Open
XinwenCheng opened this issue Sep 14, 2021 · 0 comments
Open

How to integrate SimpleMDE into Nuxt.js? #821

XinwenCheng opened this issue Sep 14, 2021 · 0 comments

Comments

@XinwenCheng
Copy link

Hi,

I'm trying to use SimpleMDE in my Nuxt.js project, but I couldn't make it yet. It would be very appreciated if anyone could share some successful experiences.

Firstly, I installed SimpleMDE by npm i simplemde --save, and then created a js file named simple_mde.js under ~/plugins folder with the following content:

import Vue from "vue";
import SimpleMDE from "simplemde";

// Vue.component("SimpleMDE", SimpleMDE); // I tried this line either.
Vue.use(SimpleMDE);

And then registered this plugin in nuxt.config.js:

  plugins: [
    { src: "~/plugins/simple_mde.js" }
  ],

So, I thought I could use the plugin on the page, here's the code:

<script></script>

<template>
  <div>
    <simplemde />
  </div>
</template>

But I failed with the following error, no clue, and didn't find out any solution for this, could anyone help? Thanks in advance!
Screen Shot 2021-09-14 at 19 16 53

BTW, before I integrated SimpleMDE, there's no such error, my website runs correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant