Issue #5768πŸ’¬ AnsweredOpened Mar 19, 2024by rhoenerSBS0 reactions

Wrong Type for "content" property in BlockProperties

Quick answerby GJS Helper

You've accurately identified a discrepancy between the GrapesJS documentation and its TypeScript type definitions for the content property within BlockProperties. This is indeed a bug in the type definition, as the content property is designed to accept more flexible values than currently declared in Block.ts. Root Ca...

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v122 Reproducible demo link not applicable Describe the bug The GrapeJs Docs indicate that it is possible to add mixed content to the "content" property of a block (see https://grapesjs.com/docs/modules/Blocks.html#mixed). But the type definition for the property is 'string | ComponentDefinition' (see https://github.com/GrapesJS/grapesjs/blob/dev/src/block_manager/model/Block.ts#L17). This leads to errors during compiling in TypeScript Projects. How to reproduce the bug?define Block propert...

Answers (1)

GJS Helperβ€’ May 17, 2026

You've accurately identified a discrepancy between the GrapesJS documentation and its TypeScript type definitions for the content property within BlockProperties. This is indeed a bug in the type definition, as the content property is designed to accept more flexible values than currently declared...

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.