-
First of all thank you for this great open source library. We are working on an email editor where there are some occasions where we must conditionally render a dom. In this case we must temporarily stop rendering some of the manager containers from grapesjs (style, blocks, layers, etc), but then show it again after a user input. Because of that, the manager containers are gone and i can't seem to find on the docs if theres a way to re-append them. Here's a reproduction of the occasion: https://codepen.io/giordanna/pen/jOaYVKy
The easiest way would be just adding For now we are using So, is there a better way of re-appending these manager containers? Edit: For now I guess I don't even need to call this.$nextTick(() => {
this.editor = grapesjs.init({...})
}); After changing the view back to the manager. https://codepen.io/giordanna/pen/YzEamVw |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well, you're leaking memory if you don't destroy it first.
I'd recommend finding a way to prevent unmounting the DOM if it's not necessary and remounting the editor just to show the preview sounds quite unnecessary. It doesn't even sound like a big challenge, especially in Vuejs which offers that for free with |
Beta Was this translation helpful? Give feedback.
Well, you're leaking memory if you don't destroy it first.
I'd recommend finding a way to prevent unmounting the DOM if it's not necessary and remounting the editor just to show the preview sounds quite unnecessary. It doesn't even sound like a big challenge, especially in Vuejs which offers that for free with
v-show
.