GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? all and none, the bug is during the build Reproducible demo link unnecessary Describe the bug How to reproduce the bug? Use NPM to install GrapesJS to use it in a typescript project. According to the documentation, to set...
artf
This seems to be related to https://github.com/microsoft/TypeScript/issues/35945 As a workaround you could do something like this for now: I guess for the TS type safety we would need to introduce some kind of helper for plugins
jchautreux
that sounds to be a good idea
artf
Added the helper here (I'll also update the docs with the usage later)
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? all and none, the bug is during the build Reproducible demo link unnecessary Describe the bug How to reproduce the bug?create a blank projectuse NPM to install GrapesJS and a plugin (preset-webpage in this example but "wor...
artf
I'm closing this as related to https://github.com/GrapesJS/grapesjs/issues/5149
jchautreux
That's not really the same problem, in the #5149, the bug is related on how to set plugin options during the tool initialization. Here, the bug is related to the last update of the project that has defined a new index.d.ts that is not comp...
artf
In the previous release index.d.ts had the same signature for plugins so I'm not sure to what change you're referring to https://github.com/GrapesJS/grapesjs/blob/095466c8cc8034e54888d67beef4cb9296c823e4/index.d.ts#L50-L53 Can you share th...
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 its...
duclet
@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 ju...
artf
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
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 di...
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 113.0.5672.63 Reproducible demo link https://jsfiddle.net/rajevar/zLs8q97f/4/ Describe the bug This is in reference to this discussion https://github.com/GrapesJS/grapesjs/discussions/4759 How to reproduce t...
rajevar
sorry, my bad. I wasn't using the latest.
artf
@rajevar I can't reproduce it with the latest version, are you sure you're using the latest one?
GJS Helper
You've identified a common synchronization issue in GrapesJS related to how component attributes are managed, especially when classes are modified via the Style Manager and then other traits (like id or title) are updated for the first tim...
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 option...
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 Proper...
GJS Helper
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...
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeReproducible demo link https://jsfiddle.net/sdimitrenco/rn8u4pc0/7/Describe the bug I'm not sure it's a bug or not, but for me, behavior look strange I have a component List that includes, component ol and component li...
artf
If the property is of the same value as the default definition, it's skipped. This is controlled by avoidDefaults config option and it's highly recommended to keep it true to have small JSONs as possible.
GJS Helper
This behavior is not a bug but an intentional optimization within GrapesJS, which leverages Backbone.js models. When you serialize GrapesJS components to JSON, attributes that match their default values for that specific component type are...
i am getting editor.getSelected().view.enableEditing(); is not a function
artf
Please avoid opening bug issues without following the issue template. You can start a new discussion with a proper description/use case of what you're looking for.
GJS Helper
The error editor.getSelected().view.enableEditing() is not a function occurs because the enableEditing method is not a public API directly available on the ComponentView instance (which editor.getSelected().view refers to). The GrapesJS ed...
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome@latest Reproducible demo link https://no-link.com Describe the bug Code of Conduct [X] I agree to follow this project's Code of Conduct
artf
Thanks @Baghunts, good catch. Current workaround would be .addStyle({ 'border-left': '...' })
GJS Helper
The issue where a background-image style isn't applied correctly to a component in GrapesJS is typically due to one of two common reasons: incorrect CSS url() syntax or the component lacking sufficient dimensions to display the background....
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 112.0.5615.137 (Official Build) (arm64) Reproducible demo link https://grapesjs.com/demo.html Describe the bug Component definition: When dropped, saved, and reload there are two places that call the same script. One in th...
artf
As explained here you should not reimport the output HTML to edit the project, only the JSON.
GJS Helper
The issue you've encountered where a component's script function runs twice after saving and reloading the page is a known behavior (or a bug, depending on the perspective) in GrapesJS's script management system. It stems from how GrapesJS...
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 112.0.1 Reproducible demo link https://github.com/davidrhoderick/grapesjs-test Describe the bug How to reproduce the bug?Follow getting started (you can see the structure I am following with a basic Parcel project...
davidrhoderick
Funnily enough, the CSS-based styling works.
artf
Looks like the Parcel transformer is trying to import codemirror/lib/codemirror.js instead of codemirror/lib/codemirror.css on this line: So I'd suggest to open the issue on the related package
GJS Helper
The issue you're encountering, @parcel/transformer-sass: expected "{" when importing GrapesJS SCSS, is a common problem related to how module bundlers like Parcel resolve and process stylesheet imports, especially when dealing with third-p...