-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Nuxt.JS + Vuetify] Error after import 'CKEditor5' (window is not defined ) #74
Comments
Hello, did you follow our Vue.js integration guide? |
Yeah, i tried all implementations. :( |
Okay, so can you provide exact steps which you perform, so we'll be able to reproduce your issue? Also, all the details about your environment will be appreciated. |
Most probably the issue is related to SSR. If so, there is a related issue – ckeditor/ckeditor5#1511. |
I'm closing it due to a lack of activity. |
There is any support for SSR in ckeditor, That's why it displays error : window is not defined. Edit: After a lot of research
in your component's template |
@usb248 its working thanks. finally got this worked.
|
The solution at #74 (comment) worked on vuejs v2.x & nuxtjs 2.x (latest)! |
Unfortunately, I couldn't do what you said in the Nuxt3 version. Could you guide me in this matter? |
Problem still persists for Nuxt 3 |
I use it this way <template>
<client-only>
<CKEditor
v-if="ClassicEditor"
v-model="content"
:editor="ClassicEditor"
></CKEditor>
</client-only>
</template>
<script setup>
let CKEditor
let ClassicEditor = ref()
if (process.client) {
CKEditor = defineAsyncComponent(() => import('@ckeditor/ckeditor5-vue').then(module => module.component))
import('@ckeditor/ckeditor5-build-classic').then(e => ClassicEditor.value = e.default)
}
</script |
Doing it this way will make SSR meaningless |
Hey @ALL,
i get the following Error after put this in my VueJS Application:
'window is not defined'
Did someone know how to fix it?
I'm using "Nuxt.JS/VueJS/Vuetify"
Thanks for the support!
The text was updated successfully, but these errors were encountered: