ChangJoo-Park/vue-editor-js

window is not defined

nodirnavruzov opened this issue · 1 comments

How can I use the editor with nuxt if my project is with ssr?

nuxt.config.js

      ssr: true

      plugins: [
        {
          src: '~ / plugins / vue-editor.js',
          ssr: false,
        }
      ],

plugins
            - vue-editor.js
          
    import Vue from 'vue'
                      import Editor from 'vue-editor-js/src/index'
                      Vue.use(Editor)

components
                    - editor.vue
                           <client-only>
                            <editor ref = "editor": config = "config" />
                          </client-only>

An error is displayed 'window is not defined'

I am having same error, it started when i added the Header plugin, Have you fixed your's