GrapesJS Issues

3,464 parsed GitHub issues 370 solved · 90 open. Search, filter and explore battle-tested answers.

466 issues found

🔍 components
#3124Nov 9, 2020by archerbj3 answers
0 reactions

Component:clicked / dbclicked event

Hi, i am trying to use video component to upload in the assets manager. And I realize I can leverage editor event component:selected to do so. it works but not perfect. I prefer to use double click to trigger assets manager to open. If we can have an event like component:clicked/dbclicked, it would be better

artf

You can extend the Video component and in its view add the same event like the one in the Image

addlistener

@archerbj have you made it work? I tried and it seems ComponentView is only type exported? <img width="883" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/4531670/e075cf79-4e93-411a-ba35-63dd2fd0ad51">

GJSBlock

Thanks for reporting this, @archerbj. Thanks for sharing your report about FEAT: component:clicked / dbclicked event. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Y...

#3122Nov 9, 2020by tranthanhhoa2 answers
1 reactions

Missing media style on the duplicated component

Version: 0.16.27 Summary: Missing media style on the duplicated component Steps to reproduce: Try to change something on Tablet or Mobile Duplicate the changed component Expected: The duplicated component has media style Actual: The duplicate component hasn't media style

artf

Thanks @tranthanhhoa I've actually fixed it already on your other issue, that one was related to the state of rules but I've noticed the same with media, so both are ready for the next release :)

GJSBlock

Thanks for reporting this, @tranthanhhoa. Thanks for sharing your report about Missing media style on the duplicated component. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/J...

#3119Nov 6, 2020by makkaronis4e4 answers
0 reactions

How to create custom block made of grapesjs components?

Hi, i want to have custom blocks made of grapesjs components. I found solution how to add components: https://github.com/artf/grapesjs/issues/1334#issuecomment-411519845 but i'm struggling with adding CSS (eaiher as string or as object).

artf

You should be able to do something like this:

makkaronis4e

@artf thanks it works, but i found bug there. When you drop this block on canvas it works ok, but if you delete this element from canvas or clear whole canvas, then drop this block on canvas 2nd time, it will lose css. 2nd time, 3rd time.....

artf

@makkaronis4e for such a case, I'd ask you a reproducible demo, please

#3117Nov 6, 2020by zhiyuanzhang-unai2 answers
0 reactions

How to remove a category if no component in it

I build the custom components at runtime based on a dropdown. When user changes the selection of that dropdown, related custom block will be added and non-related block will be removed. all custom blocks are group by different category name. if all blocks are removed from that category, it will show on the screen. Is...

artf

Try to re-render the block manager with a new collection of blocks

GJSBlock

Thanks for reporting this, @zhiyuanzhang-unai. Great question about How to remove a category if no component in it. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for y...

#3116Nov 6, 2020by aadilmehrajbhat2 answers
1 reactions

How to load css that can viewed in code viewer and also exported while saving

Hi :wave: I am trying to load some CSS within the editor as part of the theme, I am able to link stylesheets as part of loading but the problem that I am facing is when loading the styles directly using <style> tag, I am able to view the serialized version via editor.getStyle() but editor.getCss() only contains the pr...

artf

@AadilMehrajBhat First of all, display: 'block' is not a valid CSS value for that property (it should be display: block) and then .d-block is not used anywhere in your template so the result is automatically optimized by removing unused st...

GJSBlock

Thanks for reporting this, @aadilmehrajbhat. Great question about [HELP WANTED] How to load css that can viewed in code viewer and also exported while saving. The recommended approach with StyleManager is to use the event-driven API. Start...

#3115Nov 6, 2020by xinyufyj4 answers
1 reactions

Component droped position is wrong when I changed canvas size under Absolute/Designer mode

WARNING I changed the canvas size and I drop a compent from blocks panel. The result is compent postion is wrong. By the way, the editor is under 'Absolute/Designer' mode. I read the source code of the drop part. I found the compent drag start position is not based on 'editor.Canvas.getFrameEl()'. So, is this right?

xinyufyj

@artf OK, I provide some screenshot for explaining.Sorry for my bad English.

artf

Can you provide a live demo of the issue?

artf

I close this issue as I'm planning to solve all ones related to absolute positioning here: https://github.com/artf/grapesjs/issues/3770

Browse all topics