ChangJoo-Park / vue-editor-js

editor.js for Vue users
https://codesandbox.io/embed/o7lyqwmvmq
MIT License
360 stars 76 forks source link

window is not defined #89

Open nodirnavruzov opened 3 years ago

nodirnavruzov commented 3 years ago

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'

chisomgbata commented 3 years ago

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