Issue #3759πŸ’¬ AnsweredOpened Sep 8, 2021by throne19863 reactions

Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.

Quick answerby throne1986❀ 1

I solved the issue for future reference first I removed this function : editor.on("component:add", (model, argument) => { if (model.getName() === "Image") { modal.setContent(ModalImages); } }); I replaced with this function editor.Commands.add('open-assets', { run(editor, sender, opts = {}) { dispatch(setIsOpen(true))...

Read full answer below ↓

Question

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? chrome new versionReproducible demo link https://codesandbox.io/s/grapejs-reactjs-forked-zqnqo?file=/src/Editor.jsDescribe the bug How to reproduce the bug?Just drag and drop image block to canvasalso drag and drop custom image block to canvas can be found on landing pages block Live demo : https://codesandbox.io/s/grapejs-reactjs-forked-zqnqo?file=/src/Editor.js What is the expected behavior? When the user drops custom image block, default image block, or double-clicking any image on canvas instead...

Answers (4)

throne1986β€’ Sep 9, 2021

I solved the issue for future reference first I removed this function : editor.on("component:add", (model, argument) => { if (model.getName() === "Image") { modal.setContent(ModalImages); } }); I replaced with this function editor.Commands.add('open-assets', { run(editor, sender, opts = {}) { dispa...

artfβ€’ Sep 9, 2021

when you run editor.command.run('open-assets') you have to pass options, eg.

editor.command.run('open-assets', {
 target: editor.getSelected(),
})
throne1986β€’ Sep 10, 2021

@artf I solved the issue it was about closure problem , the solution just passing the URL as options as follows editor.Commands.run("open-assets", { target: editor.getSelected() url: imageUrl }); editor.Commands.add("open-assets", { run(editor, sender, opts = {}) { dispatch(setIsOpen(true)); consol...

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @throne1986. Great question about Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.