What are you trying to add to GrapesJS? Display style inline-flex. Description: Currently the display selector of the Style Manager has only flex as option but same as block and inline-block it is useful to have inline-flex. When I try to add it manually with this (hack?): I get a result but there are many conditional...
lexoyo
For anyone looking for a solution, I didn't manage to do this by modifying the StyleManager options So here is what I did
artf
Sorry @fq-selbach but this is something that could be handled via plugins, there is no need to have this logic in the core library
fq-selbach
@artf ok, but can you tell me please how I can control the "Flex" category of the Style Manager because the logic of showing/hiding it seems to be hard-coded :-/ I can add 'inline-flex' to the "Display" selector with a plugin ... but it wi...
I'm going to say this is both a feature request as I get into some parts of it, but also a bit of an issue. I would say it looks bad to have a project newer than 2015 that's using px for nearly everything. People are using screensizes that are only 768 pixels on the narrowest plane, whether mobile or desktop, to 2160p...
GJSBlock
Thanks for reporting this, @sadtaco. The issue with FEAT/ISSUE: CSS standards appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating...
I want both devices and menu buttons on the same panel but the issue is with View code button If i remove panel.render() Devices button get disappear If i do not remove panel.render() View Code doesn't work what am I doing wrong?
artf
Check the Panel API, you're using them totally wrong...
GJSBlock
Thanks for reporting this, @mohd7469. Great question about Issue with View code button. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for t...
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
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...
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...
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