Issue #5135πŸ’¬ AnsweredOpened May 22, 2023by duclet0 reactions

Incorrect type definition for StyleManager.addProperty

Quick answerby SachinPuthiyoth

Seems like the type definition in StyleManagerConfig.sectors is unchanged : https://github.com/GrapesJS/grapesjs/blob/5c890449a52f526bc480d6dc649ff5e01ec59140/src/stylemanager/config/config.ts#L8 Shouldn't we be updating this to use PropertyTypes as in : https://github.com/GrapesJS/grapesjs/blob/5c890449a52f526bc480d6...

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? All Reproducible demo link None Describe the bug How to reproduce the bug?Per the definition here: https://github.com/GrapesJS/grapesjs/blob/dev/src/stylemanager/index.ts#L304, you should be providing the options as options for PropertyProps.However, PropertyProps as defined here: https://github.com/GrapesJS/grapesjs/blob/dev/src/stylemanager/model/Property.ts#L9, does not have such a property. This is causing the TS compiler to complain. What is the expected behavior? Definition should exists. Wh...

Answers (2)

SachinPuthiyothβ€’ Jan 12, 2024

Seems like the type definition in StyleManagerConfig.sectors is unchanged : https://github.com/GrapesJS/grapesjs/blob/5c890449a52f526bc480d6dc649ff5e01ec59140/src/stylemanager/config/config.ts#L8 Shouldn't we be updating this to use PropertyTypes as in : https://github.com/GrapesJS/grapesjs/blob/5c...

GJS Helperβ€’ May 17, 2026

Thank you for reporting this issue. Upon reviewing the GrapesJS source code, specifically the dev branch and the latest stable release (0.21.10), it appears that the PropertyProps interface does include the options property. Therefore, the type definition for StyleManager.addProperty should be corr...

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.