Incorrect type definition for StyleManager.addProperty
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)
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...
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.
Issue #5613
Incorrect type definition for StyleManagerConfig.sectors.properties
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link None Describ...
Issue #5263
Deleting a component without deleting its corresponding style, will adding new components later cause style conflicts?
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? latest version of Chrome Reproducible demo...
Issue #5583
Can't set background:none in mobile version using styles panel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Edge last version Reproducible demo link h...
Issue #5144
Incorrect type definition for PanelManager.addPanel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? All Reproducible demo link None Describe t...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins β TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.