Version: v0.17.3 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? editor.Panels.addPanel({id: 'test', visible: false}) renders panel despite of visible attribute set to false. It perfectly works after editor has been rendered, so panel.set('visibility', !panel.get('visibilit...
artf
Yeah, I think it's just a matter of adding this.toggleVisible() in PanelView.render. If you want to push a PR, I'd be glad to merge it :)
GJSBlock
Thanks for reporting this, @emyasnikov. The issue with Panels "visible" attribute doesn't prevent panel rendering appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and...
Could you please expain how map components are rendered after draged? How we can create a new component for weather and how it will render like a map component? @artf
theSC0RP
You can take a look at the following (if you haven't) to understand how the map component works:Map Component ModelMap Component View
GJSBlock
Thanks for reporting this, @NagarRahul. Great question about FEAT: How Map component works? How we can create weather components and render it?. The recommended approach with Components is to use the event-driven API. Start here: Check the...
Hello! I know this is a bug reported here #2029 but now I can not update from 0.15.10 to the version that has the solution. Would you know any workaround for this issue at the moment that I am setting the component? I am using VueJS with GrapesJS. Here is how I am trying to set the component. this.grapeEditor.setCompo...
artf
No sorry, can't help with such an old version. Why you can't update??
GJSBlock
Thanks for reporting this, @ghost. The issue with 0.15.10 - setAttribute - is not a valid attribute name appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modi...
Hi there! I'm building a custom modal for the Asset Manager and basically, it seems that I need to override command. How I can understand if a user wants to set an image src or background-image property? Thanks in advance!
advancedsoftwarecanada
Seconded, just started with GrapeJS and got it operational on my system, looking to set the background image on a header div without having to write css code :/
artf
Actually, the knowledge of what to do on asset selection should not be part of the command itself as the action should be decided by who runs the command, eg. I'd suggest inspecting the current implementation of the command, but I have to...
advancedsoftwarecanada
This is not the right solution to our question. What I'm looking to do is add this to a component, how would we do this?
When dragging a component from right panel component model doesn't set to default value but has value of previously added component
sidh01
I have solved this the problem was when we set model property then I need to use deep clone for array or object
artf
Hi @sidh01 it's definitely something on your side, we can try to help you if you're able to create a reproducible demo.
GJSBlock
Thanks for reporting this, @sidh01. Thanks for sharing your report about Component model is not reset when create new drag. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFid...
In that case, I suggest you access the document of the iframe and to append manually the inline script (to get the document use editor.Canvas.getDocument()) Originally posted by @artf in https://github.com/artf/grapesjs/issues/2012#issuecomment-496304498 Hey, @artf, I was going through the issue, #2012 and I have a do...
theSC0RP
I tried to update the inline script using the following steps:Get the document of the iframe: iframeDoc = editor.Canvas.getDocument()Get the innerHTML of the body of the document: iframeDocBodyHtml = iframeDoc.body.innerHTMLReplace the inn...
theSC0RP
I tried to add the select and hover events by running component-select command by writing editor.trigger('core:component-select') but that didn't help either and doing editor.runCommand('core:component-select') gives an error. Am I missing...
artf
Well, I think it won't be bad to add an easy way to force the rerender of the iframe (not a common case but for sure might be useful in some cases). Unfortunately, right now, you should try to use private methods and check if everything wo...
hello guys. I am using this awesome project for a production app written with React.js, So I integrated it inside my app. everything works fine but I have a problem with auto saving the editor data on each change to editor. OS: Windows 10 Browser: Chrome 90 GrapesJS version: 0.17.03 latest on 26/04/2021 EDITOR INSTANC...
artf
Thanks @maxtsh for the report, there is actually an issue with those old blocks from the basic plugin which breaks the storage counter. I'll push the fix soon. For now, as a hotfix, update those blocks in this way.
GJSBlock
Thanks for reporting this, @maxtsh. The issue with Auto save is working partially and stops working after inserting text appears to be a race condition or state management timing problem. This typically happens when component lifecycle eve...
When I enter the editor and use setComponents or addComponents to add components in the store, the first class of the first element will be added to the class of a certain element inexplicably. Does anyone know the reason? I need help! ! !
sizhousama
@artf
artf
That class is coming from your app so there could be thousands of reasons, we can't help you just by looking at 2 screenshots. If you think there is a bug, open the issue correctly (by following the template) and create a reproducible demo.
GJSBlock
Thanks for reporting this, @sizhousama. Great question about Editor's strange behaviorοΌ. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look fo...
I would like to create a custom component with a property that will be updated by specific code, but I don't want this property to be visible and updatable as a trait; let say my property is called "ebTesto", I wrote a plugin function like that: I expected to find my new property in the "gjs-components" part of the st...
ltenti-eventboost
Thank you both!
Ju99ernaut
I think it's not stored since the property hasn't been changed from the default. The editor should be able to recover the property from the component definition itself.
Currently we have this GrapesJs style: But, we are looking to have this GrapesJs style: My questions are: 1- - how we can change the format in the devices? we would like to have buttons instead of dropdown. 2- is possible move the buttons 'view code' and 'fullscreen' inside the page?
Ju99ernaut
You'll just need to set the device or run the respective commands on the button's click event eg.
GJSBlock
Thanks for reporting this, @marcepoblet. Great question about [QUESTIONS] How to changes styles of devices, view code and fullscreen. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS...