Skip to content
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

slow initialization, add helpful tip to documentation #182

Open
TheNewSound opened this issue Apr 11, 2021 · 1 comment
Open

slow initialization, add helpful tip to documentation #182

TheNewSound opened this issue Apr 11, 2021 · 1 comment

Comments

@TheNewSound
Copy link

When using the CKEditor component on a page, navigating to that page becomes extremely slow, causing a short UI-freeze (because Vue is setting up all components before rendering).

Something like the following can be helpful:
Add v-if="mountEditor" to <ckeditor> component in the template.

<ckeditor v-if="mountEditor" :editor="editor" :config="editorConfig"/>

Add mountEditor boolean to component data and add setTimeout(() => { this.mountEditor = true }, 800) in the page mounted() lifecycle hook:

  data () {
    return {
      editor: ClassicEditor,
      mountEditor: false,
      editorConfig: { toolbar: ['bold', 'italic', '|', 'outdent', 'indent', '|', 'numberedList', 'bulletedList', '|', 'link'], language: this.$Lang.getLocale() }
    }
  },
  mounted () {
    setTimeout(() => { this.mountEditor = true }, 800)
  },
@Reinmar Reinmar added the squad:devops Issue to be handled by the Devops team. label Oct 28, 2021
@TLA020
Copy link

TLA020 commented Sep 5, 2023

This is still an issue

@pomek pomek removed the squad:devops Issue to be handled by the Devops team. label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants