-
Notifications
You must be signed in to change notification settings - Fork 103
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
[BUG] CKEditor isn't removed from the DOM #37
Comments
Have the same bug. After init Ckeditor toolbar and draggin component to another place we have 2 toolbars. |
I found the solution: let rteToolbar = editor.RichTextEditor.getToolbarEl();
[].forEach.call(rteToolbar.children, (child) => {
child.style.display = 'none';
}); change to: let rteToolbar = editor.RichTextEditor.getToolbarEl();
[].forEach.call(rteToolbar.children, (child) => {
child.remove();
}); and run |
fix bug : 1: GrapesJS#49 2: GrapesJS/mjml#193 3: GrapesJS#37 4: GrapesJS#31
@jackyhuynh0407 will you open a PR with it? Well, test it. This code doesn't allow me to edit a text anymore. 🤔 |
Yes I have other solution. But i forgot to update it. I'm not open PR yet let rteToolbar = editor.RichTextEditor.getToolbarEl();
[].forEach.call(rteToolbar.children, (child) => {
if(child.id == `cke_${el.id}`) child.remove()
else child.style.display = 'none';
}); |
@jackyhuynh0407 nice, thank you! |
CKEditor isn't removed from the DOM after component deselected. It could cause weird bugs like double CKEditor:
The text was updated successfully, but these errors were encountered: