Is it possible to change 'checked' trait of checkbox component simple by clicking on component inside canvas?
artf
Yeah sure, the trait reads the value from the component model, so if you change the binded value, the trait should change
GJSBlock
Thanks for reporting this, @christosapos. Great question about Change checked trait of checkbox component with click inside component.. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS doc...
I want to add an indication for a trait. For my component, I have the traits: and for the type 'dateformat-indication', I created the type: However, I get an input within this type that I created even if it wasn't on its template: Is there a way to disable default input of the trait?
ahmedderkaoui
Using the method below works fine:
GJSBlock
Thanks for reporting this, @ahmedderkaoui. Great question about FEAT: adding indication as a Trait without any input.. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation fo...
Hey artf, I would like to thank you for building such a powerful tool for building customized CMS. I'm implementing a new page feature in my project so I'm using your reference to switch between components but It gives me an error, Please can you guide me on how to build a new page on click add new button from the pan...
Ju99ernaut
I think arrays aren't the best method of storing page objects, so running array operations to get the page plus loading the page is probably too much for your call stack. You should consider loading the pages into memory only when you need...
artf
I'm not sure what is happening on your side but I'd suggest keeping an eye on #3206 as the built-in page manager is almost ready (I'll update that issue)
GJSBlock
Thanks for reporting this, @pranay2210. Great suggestion about Switching between components gives maximum call stack size error! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Usi...
Version: 0.16.45 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? There shouldn't have null text. What is the current behavior? After saving the data to the database and retrieving it (see attached components object) the null will appear. This is how I assign the components...
artf
Seems to be an issue on your side as I can't reproduce it (maybe you're doing something wrong on your back-end?!). Try to create a reproducible demo first (by using the localStorage)
GJSBlock
Thanks for reporting this, @dluague. The issue with null text after saving. appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating a...
Hello guys, First of all i would like to express my gratitudes for this amazing tool. I have extended button component based on text component so as to can edit the content of button manually without using traits. The code for the extended button component is this: var comps = editor.DomComponents; var defaultType4 =...
artf
Seems like space triggers the click event in Chrome. The solution seems to be to add the preventDefault on keypress https://stackoverflow.com/questions/22104860/chrome-firing-onclick-when-space-typed-in-contenteditable-button ps. avoid ext...
GJSBlock
Thanks for reporting this, @christosapos. Great question about Cannot add spaces to extended button component based on text component.. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS...
I am trying to use the set function to change the content of a component, but actually the result is an empty component with nothing inside. This is an example with the code summarized Version used: 0.16.44 What is the expected behavior? The code executed should result in a component with text "foo" inside. What is th...
artf
you shouldn't use the content property, use selectedComponent.components(str)
GJSBlock
Thanks for reporting this, @nairdapuiu. Great question about Set content function empties the component content. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your...
How can I disable model drag button on this event:
artf
If for model drag button you mean the button on the toolbar, you should update the toolbar property, eg:
GJSBlock
Thanks for reporting this, @qweiop801. Thanks for sharing your report about Set Model property.. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your GrapesJS version...
What are you trying to add to GrapesJS? Un-minified versions for each release Describe your feature request detailed I am working with some more complex methods utilizing the Component Manager. The last release that had an un-minified 'debug' version was 0.15.xx. Can you please release the unminified as well as the mi...
artf
Hi @mitcht the current bundle includes the minified file but also its source map, so you can easily view the original code from dev tools (more about it here), therefore there is no reason to include also the unminified version if you need...
GJSBlock
Thanks for reporting this, @mitcht. The issue with FEAT: Unminified version in the latest release appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modificatio...
Version: Latest You can get the version by typing grapesjs.version into the console Are you able to reproduce the bug from the demo?[X] Yes[ ] No What is the expected behavior? Component with empty body should not be populated with default content. What is the current behavior? When we create an empty node and pass it...
artf
You have defined the default content in the component definition, so, an empty one will use that as default. Just move that content from component definition to the paragraph block.
harsh201
@artf Any help here?
harsh201
Thanks @artf! Completely forgot about adding at block level.
Hi, thank you for reviewing my problem. I want to use my own JSEditor to edit htmlγcss and js. 1γFirst, I use getHtml, getCss, getJs to display the code in my JSEditor. And I found that the JS code is compressed. How can I get an Uncompressed code? I use editor.CodeManager.getCode(model, 'js') and it's also a compress...
artf
The script used by components with JS relies on the same code from your source. For example, if you create a plugin and then build it with webpack/babel, then the component will print the result from build. I guess you could create separat...
xinnai
@artf Hi, I'm not sure if you understand my question. I want to edit the js code in my own js editor, first I set the js code from your editor using getJs(), but it looks like this in your demo.html: These code are all compressed. I want a...
artf
autoBeautify is an option passed to CodeMirror but in any case, it might beautify the code but it won't uncompress it as the code itself is stored like that in the component