Issue #4481πŸ’¬ AnsweredOpened Jul 27, 2022by skru0 reactions

V0.19.5 Breaks headless editor.setComponents() (with Map/Video block)

Quick answerby artf

Thanks @skru I've actually already taken care of the parseUri here so it should work in the next release

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 102.0.5005.115 (Official Build) (64-bit) Reproducible demo link Describe the bug This is an extension of #4473 When adding a map or video block via editor.setComponents() in a headless environment you get a similar "document is not defined error" stemming from ./src/dom_components/model/ComponentImage.js where parseUri() is trying to use the document object. I've had to quickly put a fix in for us as it's a product launch stopper. I've refactored the parseUri() method to look like this (tes...

Answers (2)

artfβ€’ Jul 28, 2022

Thanks @skru I've actually already taken care of the parseUri here so it should work in the next release

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @skru. The issue with v0.19.5 Breaks headless editor.setComponents() (with Map/Video block) appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating an inconsistent st...

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.