plugin cannot be used in nuxt
See original GitHub issueSummary
plugin cannot be used in nuxt error message: self is not defined
Screenshots

Version:
- System: macOS 12.0.1
- nuxt: 2.15.3
- @toast-ui/vue-editor: 3.1.1
Code
/plugins/tui-editor.js
import Vue from 'vue'
import { Viewer } from '@toast-ui/vue-editor'
import '@toast-ui/editor/dist/toastui-editor.css'
Vue.component('Viewer', Viewer)
/nuxt.config.js
... // other
plugins: [
{ src: '@/plugins/tui-editor.js', mode: 'client' }
}
... // other
Viewer.vue
<template>
<client-only>
<viewer :initial-value="value" :height="height" :options="editorOptions" />
</client-only>
</template>
<script>
import chart from '@toast-ui/editor-plugin-chart'
import colorSyntax from '@toast-ui/editor-plugin-color-syntax'
import tableMergedCell from '@toast-ui/editor-plugin-table-merged-cell'
import codeSyntaxHighlight from '@toast-ui/editor-plugin-code-syntax-highlight'
export default {
name: 'MarkDownViewer',
props: {
value: {
type: String,
default: ''
},
height: {
type: String,
default: '100%'
}
},
data() {
return {
chartOptions: {
minWidth: 100,
maxWidth: 600,
minHeight: 100,
maxHeight: 300
}
}
},
computed: {
editorOptions() {
return {
minHeight: '500px',
plugins: [
[chart, this.chartOptions],
codeSyntaxHighlight,
colorSyntax,
tableMergedCell
]
}
}
}
}
</script>
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Plugins directory - Nuxt
The plugins directory contains your Javascript plugins that you want to run before instantiating the root Vue.js Application. This is the place to...
Read more >Unable to use standard Vue plugin with Nuxt - Stack Overflow
It is a usual vuew plugin package, but I'm not sure how to get it to work with nuxt. Any help very greatly...
Read more >Problems With Server-Side Plugins in Nuxt.js
When you use server-side rendering in Nuxt, you can create highly dynamic and performant experiences. But, it relies on a node server which...
Read more >Nuxt Third Party Code Is Poison: Cure It In 3 Easy Steps
#1 Move All External Integrations To Plugins ... The standard way to add scripts to Nuxt sites is to use head(). This may...
Read more >How to create a global custom plugin in Nuxt.js
You can use this component to implement different types of functionalities in your application, and it comes in handy when you can't find...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@jianweigit @JakeStanger Sorry for late replying. we has not yet officially supported SSR. There are many requests for this, so I will work on the next minor version.
Guys please if you’re going to make posts like these can you avoid tagging everyone in the quotes, we do get notified still.
It’ll happen when the dev gets to it, if you need it that badly submit a PR.