#3126November 9, 2020by mohd74693 answers
on click to upload button side preview works fine but when clicking on that video preview it throws error and rest of all images stop working, I need to show video in canvas body like images are shown this is what I am doing Here you see live
mohd7469
@artf can you tell me please how can I upload and preview video files rather then images?
ZeroCoolHacker
@awais786327 I am also struggling with uploading different assets. Maybe this can help. https://grapesjs.com/docs/modules/Assets.html#uploading-assets
ZeroCoolHacker
@awais786327 I have looked at the site and it looks like that you need to add autoplay="true" in your video tag to make it play
#3125November 9, 2020by fq-selbach2 answers
Version: 0.16.27 Are you able to reproduce the bug from the demo? [x] Yes [ ] No What is the expected behavior? When adding background-image via Style Manager it show as background-image: url(...);. What is the current behavior? Instead of background-image:url(https://grapesjs.com/docs/logo.png); you will get backgrou...
johnkeel-thork
Was about to report the same problem. Added Image as background: <img width="847" alt="Screenshot 2021-12-23 at 12 06 51" src="https://user-images.githubusercontent.com/26764290/147238562-8df3ea2a-aca7-4b08-9d64-73fd1495d699.png"> Its bein...
artf
Closing as from the same jsfiddle the issue seems to be solved
#3124November 9, 2020by archerbj2 answers
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">
#3123November 9, 2020by fq-selbach3 answers
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...
#3122November 9, 2020by tranthanhhoa1 answer
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 :)
#3121November 9, 2020by sadtacoNo answers
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...
#3120November 8, 2020by mohd74691 answer
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...
#3119November 6, 2020by makkaronis4e3 answers
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
#3118November 6, 2020by zhiyuanzhang-unai1 answer
do you have a list of block icons (css class) which out of the box. I saw some good block icons on the UI, but don't want to see the full list.
artf
By default, a Font awesome library is loaded inside the editor https://github.com/artf/grapesjs/blob/347e529e23e630b7e4d003b4f40c888f2fecd738/src/editor/config/config.js#L159-L161
#3117November 6, 2020by zhiyuanzhang-unai1 answer
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