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? 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
ClaudeCode
Thanks for reporting this, @davidrhoderick. Great suggestion about Error importing codemirror library in SCSS! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event syste...
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link no Describe the bug I believe many links of configuration objects in the docs are still to javascript files but the code has been updated to typescript <img width="1437" alt="Screenshot 2023-03-0...
ClaudeCode
Thanks for reporting this, @himansh-gjr. The issue with broken links in the docs appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creat...
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Any Reproducible demo link https://grapesjs.com/docs/modules/Commands.html#stateful-commands Describe the bug How to reproduce the bug? in a typescript setup, What is the expected behavior? it is allowed, as in the "Let's...
artf
Thanks @froodian I'll update them
ClaudeCode
Thanks for reporting this, @froodian. Great suggestion about index.d.ts says that run commands should return void but docs say their return value may be used! While this specific feature isn't yet in the core API, there are several ways to...
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? AnyReproducible demo link https://grapesjs.com/docs/modules/Components.html#component-definitionDescribe the bug How to reproduce the bug?https://github.com/artf/grapesjs/blob/dev/index.d.ts#L2055 shows components as Backbon...
ClaudeCode
Thanks for reporting this, @froodian. Great question about index.d.ts says that components must be Backbone.Collection<Component> but the docs say Component[] is also accepted. The recommended approach with Components is to use the event-d...
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v 100.0.4896.75 Reproducible demo link https://stackblitz.com/edit/typescript-ou8qpc?file=index.ts&view=editor Describe the bug How to reproduce the bug?Try to init grapesjs with with index.d.ts What is the expected...
artf
Thanks @dinosaurawr that was fixed here https://github.com/artf/grapesjs/pull/4216/files
ClaudeCode
Thanks for reporting this, @dinosaurawr. Great suggestion about init() method typings error! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative app...
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 99 Reproducible demo link No link Describe the bug How to reproduce the bug?I was using grapesjs 0.18.2 in my typescript angular class imported like this - import as grapesjs from 'grapesjs';Upgraded to 0.18.4 What...
artf
Should be fixed here https://github.com/artf/grapesjs/pull/4216 I guess you should disable TS for the current version.
aharishsundhar
@artf im using grapesjs latest version ^0.18.4 i install npm grapesjs to run it its error on index.d.ts file can you please update issue npm install: manually change it local: manully update it my side can you please update the modules sid...
ClaudeCode
Thanks for reporting this, @varadero. Great question about *"index.d.ts is not a module" in 0.18.4 when grapesjs is imported with "import as grapesjs from 'grapesjs';". The recommended approach with ProseMirror is to use the event-driven A...
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Crome 95 Reproducible demo link none Describe the bug How to reproduce the bug?Add ts config fileAdd grapes as dependencyImport Grapes via import * as grapesjs from 'grapesjs'; and @import "~grapesjs/src/styles/scss/main.s...
artf
Hi Denny, thanks for the report. I'm closing this in favor of #3902 as it should be related (even if the error is different). Please try the new version and let me know if it fixes the issue.
marcosvnmelo
I'm working on a React + Typescript project and i'm having this same error on .28 version
ClaudeCode
Thanks for reporting this, @denny99. Security and dependency issues are important. The GrapesJS team actively works on keeping dependencies up-to-date. For you right now: Run npm audit fix to see available patches Check for a newer GrapesJ...
I need to generate the JSON object model of the page designed instead of generating the HTML, CSS, and js code, is there a function that returns the JSON object of the page designed? Also, I'm implementing the UI builder in angular so the typescript version will be preferred.
artf
I'd highly recommend reading the documentation pages like Components and Storage Manager where all these parts are covered.
ClaudeCode
Thanks for reporting this, @ola-893. Great question about FEAT: JSON Object model of the page generated. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your speci...
Are you using the latest release (older versions are NOT supported)? Yes Are you facing the bug with your local copy of GrapesJS or with the current demo? LocalOS: ArchlinuxBrowser: Firefox 74.0 and Firefox developer edition 75.0b11Grapes: v0.16.3 What is the expected behavior?Highlight should update its position when...
artf
Yeah really weird, my first guess was that canvas toolbars weren't updating on the window scroll, so I've tried to create a non-fullscreen example with a long page but I've realized that there is no scroll listener (on the main window) bec...
tomaskallup
Hi, thanks for the reply! Firefox doesn't seem to be the issue here (same behaviour in Chrome) Also the replication repo works in both browsers without the bug. I'm not loading anything in iframe (this is inspector layout from the actual p...
tomaskallup
@artf I think I found the cause, our root element <div id="โค"> has this style: Adding that to the reproduction repo caused the issue to appear! (Removing the flex seems to fix the issue, I'll investigate if we really need it in our case, b...