ckeditor / ckeditor5-vue2

Official CKEditor 5 component for Vue.js 2.x.
Other
35 stars 17 forks source link

Feature Request - Lazy Directive #8

Open dan-whitehouse opened 3 years ago

dan-whitehouse commented 3 years ago

Background: I'm using Vue2, Bootstrap Vue, and CKEditor5 Bubble Block editor.

I think it would be useful for both ckeditor5-vue2 and vue3 to consider adding a 'lazy' directive to the editor, so that the DOM doesn't get over-populated on page load.

image

What I'm really asking for the ability to not load the content of ck-body-wrapper until it's needed. Bootstrap Vue achieves this somehow and adds comments <!----> where the code will be and adds it as needed. Below is an example of Bootstrap Vue tabs, and it their content not being rendering until the user clicks on the tab.

image

It's worth mentioning that I have 3 editors on my page, the first two are in the first tab, so the editors and their balloons are always loaded in, which is why I want to lazy load the bubbles. My third editor is in another tab, and because I have set the tabs to lazy, the editor and it's bubble don't get created until I click the tab.

image