Issue #5229πŸ’¬ AnsweredOpened Jul 10, 2023by joukhar1 reactions

Textnode with content "null" is rendered as "null" not whitespace

Quick answerby artf❀ 1

Probably in the first week of August

Read full answer below ↓

Question

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 114.0.5735.199 (Official Build) (64-bit)Reproducible demo link N/ADescribe the bug How to reproduce the bug?Drop this component <div class=\"flex items-center rounded shadow-md overflow-hidden max-w-xl relative dark:bg-gray-900 dark:text-gray-100\"> <div class=\"self-stretch flex items-center px-3 flex-shrink-0 dark:bg-gray-700 dark:text-violet-400\"> <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" class=\"h-8 w-8\"><path stroke-li...

Answers (4)

artfβ€’ Jul 17, 2023

Probably in the first week of August

artfβ€’ Jul 11, 2023

Hi @joukhar is it happening with the latest version? I'm able to see nulls in the export code if I use your exact JSON example (that should be fixable), but I'm unable to generate those textnodes with nulls by using your HTML example, can you create a reproducible demo for that use case? Not sure i...

joukharβ€’ Jul 11, 2023

thanks for the replay, if you need demo so please give me some time until i make one , i will comment again when im finished it the problem happens only when u store it and load it, but when u drop the component for the first time nothing happened

GJS Helperβ€’ May 17, 2026

This is a known regression in GrapesJS where whitespace-only text nodes are incorrectly parsed and serialized, resulting in textnode components with content: null. When these components are subsequently rendered, the null value is coerced into the string "null", which then appears on the canvas and...

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.