init() { this.listenTo(this.model,'change:components', this.handleComponentsChange); }, I develop a component, I try to listen the child components change, then I add above code to view init, but the function doesn't fired when add/remove component. how I can listen the components change in a component view? thanks
dm-siegel
I couldn't get this to work either. Error reading components() when setting the listenTo. The tag is empty (no contents inside) on init, so this makes sense. never mind... i was doing this in the init of the model instead of the view. this...
anlumo
The components collection doesn't change, that's why there's no event triggered. The storage backend is a Backbone collection, see here. You have to listen to its events, specifically add and remove.
artf
As already mentioned by Andreas, you have to add a listener to the collection.
Version: 0.17.4 Are you able to reproduce the bug from the demo?[x] Yes[ ] No Steps to reproduce:Go to the demoDrop a "Text" block inside the canvasClick on the "Text" component that was just droppedThe opened RTE is misplaced (cf attached screenshot) What is the expected behavior? The opened RTE should be positioned...
artf
Yes, I guess you're right. It doesn't actually make sense activating RTE without selecting the component (it probably makes sense with all other "activatable" blocks).
gustavohleal
Hi. Me and @ronaldohoch have found a workaround for this problem. We trigger the scroll event when the RTE is enabled. Here's the code:
ronaldohoch
Hello, just updated the file from commit bb4a661, and i think it's so close, i'm using the grapesjs-ckeditor code and the first open of RTE, i'ts placed right: But at the second time the rte is open, it's misplaced again... :/ I'll keep ch...
I add domComponents: { storeWrapper: 1 }, when initialize the webeditor, to enable add background image to body. it works fine when use the local storageManager , but all the components lost when use the remote storageManager below is the data {"type":"wrapper","droppable":".container","attributes":{"id":"izmf"},"comp...
artf
Hi @jcsofts if the local storage works fine and your remote does not, that means you're probably doing something wrong on your endpoint side. I can't help you here without a reproducible example so I can only suggest following properly thi...
GJSBlock
Thanks for reporting this, @jcsofts. Thanks for sharing your report about version 0.17.4 the components missing when try to add background image to body. To help the team investigate and prioritize this: Please provide: A minimal reproduci...
I got this error when add the <iframe src="https://app.conversiobot.com/boot/fvMEvO" width="100%" height="500" frameBorder="0" allow="geolocation"></iframe> used the custom code component. my code works fine with 0.17.4, but got below error with 0.17.19 grapes.min.js:2 Uncaught TypeError: Cannot read property 'length'...
artf
Thanks for the report, the fix is ready for the next release.
rahul-singh-bv
I am encountering a similar issue with v0.19.5 when I try to add an iframe inside of a custom code block
GJSBlock
Thanks for reporting this, @jcsofts. The error TypeError: Cannot read property 'length' of undefined occurs when Canvas attempts to access properties before the component lifecycle is fully initialized. This is a common race condition in G...
Following example from docs . Is there further configurtion to make new traitsa show for elements? The example using the input does not run, My id's are being picked up but not the additional attributes.
artf
I'm able to see your example properly and all the traits are working correctly. Are you able to create a reproducible demo?
no-response[bot]
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...
GJSBlock
Thanks for reporting this, @alpha2k-io. Great question about adding traits are not picked up by trait manager.. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your...
Version: 0.17.17 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? It shouldn't show duplicate controls. What is the current behavior? Describe the bug detailed For some reasons, i am getting duplicate controls with vanila setup of gjs. Are you able to attach screenshots, scr...
artf
Add this to your init config in order to remove the default properties styleManager: { clearProperties: 1 },
GJSBlock
Thanks for reporting this, @jasminder. The issue with Duplicate controls for every component appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications ov...
Hi! I created a DOM component and I was thinking whether it is possible to delete the div wrapper when I delete the child text component. I tried to do it with the removed hook but couldn't came up with the correct solution. Thanks!
GJSBlock
Thanks for reporting this, @sktlmarat. Thanks for sharing your report about Remove the wrapper when the child component is deleted. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandb...
Hi, please what is the best way to implement multiple page manager in a react app. I have successfully implemented this without page manager like so: For the page manager implementation I try this: Here, I get undefined for page manager. I would appreciate any help please. Thanks
artf
I think you're just using an old version of GrapesJS
GJSBlock
Thanks for reporting this, @Ubanna. Great question about undefined for multiple page manager in React. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specifi...
0.17.19 Are you able to reproduce the bug from the demo? YES What is the expected behavior? I had asked a question regarding iframe refresh (#3413). The proposed solution was working for that version (0.17.3) and after running the piece of code the iframe should refresh and the canvas should be seen with the component...
artf
I would need to check why he is still trying to remove the frame, but for now, just skip this line frameView.remove()
theSC0RP
@artf. Thanks. This works when done once. If I do some action like a click inside the canvas and then if I run frameWrapView.render(); once again, I got another error. The screenshot and a video of this error are attached below. <hr> https...
artf
I'll try to fix it in the next release, but for now, you have to unselect components before frameWrapView.render() and reselect them back post rendering
Is there a possibility to edit data attributes on components?
artf
Yes, please check the documentation and follow issue templates
GJSBlock
Thanks for reporting this, @MarksEliel. Great question about How to edit data attributes. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look f...