I am making a simple blog website with nuxt.js, I need to import editor only in one component, I don't want to use nuxt.config.js
. This is what I am trying to do, but it's seems not working.
//Inside '~/plugins/vue2-editor'
import Vue from "vue";
import Vue2Editor from "vue2-editor";
Vue.use(Vue2Editor);
export default {Vue2Editor}
//Inside component
<template>
<div class="text-editor">
<client-only>
<Vue2Editor/>
</client-only>
</div>
</template>
<script>
import {Vue2Editor} from '~/plugins/vue2-editor'
export default {
components: {
Vue2Editor
},
}
</script>
What should i do?