Issue #5144πŸ’¬ AnsweredOpened May 25, 2023by duclet1 reactions

Incorrect type definition for PanelManager.addPanel

Quick answerby duclet❀ 1

@artf - You didn't read the full sentence. You can clearly see in the code itself, it requires the argument given as the full Panel object. In your docs (as linked), you are not giving it the full Panel object in the example, but rather just an object with those projects. Your example is the following: Which TypeScrip...

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 The definition of the function located here: https://github.com/GrapesJS/grapesjs/blob/v0.21.1/src/panels/index.ts#L82 requires the data given as the full panel instance itself or an array of properties. The documentation on the site (https://grapesjs.com/docs/getting-started.html#panels-buttons) says the parameters given can be only an object with the properties (essentially a partial of the attributes of a panel). Code of Conduct [X] I agree to fo...

Answers (3)

ducletβ€’ Jun 13, 2023

@artf - You didn't read the full sentence. You can clearly see in the code itself, it requires the argument given as the full Panel object. In your docs (as linked), you are not giving it the full Panel object in the example, but rather just an object with those projects. Your example is the follow...

artfβ€’ May 27, 2023

The documentation on the site says the parameters given can be only an object with the properties

Sorry, where exactly do you read that statement?

GJS Helperβ€’ May 17, 2026

Thank you for reporting this and bringing it to our attention. It's important to ensure clarity between type definitions and documentation. After reviewing the GrapesJS v0.21.1 source code and the documentation, it appears there isn't a discrepancy, but rather a potential misunderstanding of the Ty...

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.