What are you trying to add to GrapesJS? As described in BUG: Panels "visible" attribute doesn't prevent panel rendering I tried to prevent panel rendering on initial start. Since visible attribute didn't work for me I tried some workarounds until I noticed all my changes are gone after render has been called. So best...
artf
Thanks @emyasnikov I'll close this and will keep the bug issue open
GJSBlock
Thanks for reporting this, @emyasnikov. The issue with FEAT: Event to hook into after editor.render has been executed appears to be a race condition or state management timing problem. This typically happens when component lifecycle events...
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?
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...
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...
What are you trying to add to GrapesJS? Add support for CSS Grid (display: grid;) and its various options. I have no immediate personal need for this, but I figured it should be tracked.
Ju99ernaut
This plugin has a css grid layout tool https://github.com/Ju99ernaut/grapesjs-plugin-toolbox https://user-images.githubusercontent.com/48953676/115495409-d98a9000-a267-11eb-923a-b6f86cbefc99.mp4
artf
@Ju99ernaut amazing plugin
GJSBlock
Thanks for reporting this, @rattrayalex. Great suggestion about FEAT: CSS Grid! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: List...