#863February 13, 2018by nojacko3 answers
As title + background-image is removed by styles manager when added a background layer.Getting started: https://jsfiddle.net/5upe6myo/Note background-imageClick between the text. Should show as "Box".Under Styles > Decorations, the background-image isn't shown.Clicking "+" next to background removes the background-ima...
nojacko
The styles I've defined for my element aren't reachable in the style manager. When I click the box in the canvas I'd really expect to see all the styles it has in the style manager, rather than the the styles of the class Grapes has added....
artf
Actually, this is how style manager works with classes. When you select the "Box" you can see that you have picked ".fluid-container.c318" selector, which doesn't have any bg, but when you uncheck "fluid-container" class, the current selec...
nojacko
This seems a little weird. Grapes adding the class c318 makes my styles unreachable. I'd expect the html and styles provided to be editable.
#862February 12, 2018by ancanot3 answers
I want to integrate Image viewer jquery plugin in grapesjs new custom block but jquery code doesn't recognize. How can write jquery code in component?
artf
You have to load JQuery first. Read more about it here https://github.com/artf/grapesjs/wiki/Components-&-JS#dependencies
ancanot
I have loaded jQuery first. ImageViewer Plugin url - https://www.jqueryscript.net/gallery/jQuery-Plugin-For-Product-Viewer-with-Image-Hover-Zoom-BZoom.html The problem is that, when I create component, plugin connected (I give plugin js in...
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
#861February 12, 2018by hillelcoren3 answers
I've followed the docs and have been able to upload images. When I drag an image block (using the newsletter preset) and select an image from the assets it adds a blank image to the canvas. I need to double click the image on the canvas and select the image again for it to show. Is there something I need to do to wire...
artf
... it adds a blank image to the canvas Can't reproduce it. Any live demo? Or at least a screencast/gif?
hillelcoren
I put together a basic sample and it works, it must be a problem with my code.
hillelcoren
Sorry to take up your time! If anyone else sees this problem in my case it was happening because I was using the canvas:drop event to adjust the HTML (to perform a mail merge). I've fixed it by checking if the user is dropping an image in...
#860February 12, 2018by vrudikov3 answers
So i'm trying to bootstrap this integration and i think MDL framework doesn't run, because JS components are not initialized at all Here is the plunker I digged into the code of both GrapesJS and MDL and both seems work ok. I tried several ways of initializing MDL JS: canvas init, init script after GJS div content, bu...
artf
Hi @vrudikov JS seems to be loading correctly (and you can see that by other JS elements like dialog) but seems like MDL is not auto-initializing. I think you just have to find how to call its init method
vrudikov
For everyone who want to have Material + GrapesJS integration - just use material-components-web
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
#859February 12, 2018by hibuno2 answers
Hi there, I have some question about canvas style, in this case i have config like this. By default i use css with name builder-desktop.css for default canvas style. And then i want if i change Device Manager and choose mobile, i can change a canvas style to builder-mobile.css. Thank you very much
hibuno
Hi there, Forget it i solve this problem, just add event on change like this. Thank you
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
#858February 12, 2018by poirin3 answers
I need the function to copy the html/css code in the view code component automatically. Is there a predefined function? or I must implement this directly?
hibuno
Hi @poirin , I have some solution, last week i have this problem too i try to save current HTML & CSS without manual copying. And below is my code . --- Add custom panel eg. left top button (save button). And then create save function Good...
artf
If you're talking about storing your templates int DB or any other remote endpoint you can setup the built-in RemoteStorage, take a look here #778
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
#857February 11, 2018by webnoob3 answers
Hi, First off, this is what I've been looking for for a long time so thanks for your efforts. Next, I'd like to add a font in the Typography | Dropdown list. How do I go about adding one? Note: I've seen the posts where you suggest adding a new stylesheet but I want it to only apply as per the Typography options. I al...
IceCrystal0k
This is how i added new fonts to the style manager: Call this functions either after initialize, or on editor.on('load', ()=> { .... addFonts() ... }) if you use a preset like newsletter preset that alters the style manager after load. als...
artf
Hi @webnoob currently the only way to do so is to add it via the initialization object. Here is the snippet from the demo https://github.com/artf/grapesjs/blob/gh-pages/demo.html#L1045-L1062 As you see can see I don't specify any font fami...
webnoob
Thanks for this. Based on what you showed me above, I've used the StyleManager to add the extra font in, like so: I suppose using this method I would need to import the actual font via a stylesheet into the editor for it to actually work o...
#855February 9, 2018by kewilson3 answers
I've implemented a new plugin that adds another button in the export window, it's working fine. However when the page displays there isn't a space between it and the existing "Export ZIP" button. How might I go about adding a space the grapesjs way? Is it just figuring out which html dom element properties to tweak? ....
ryandeba
Hi @kewilson, If I'm understanding your issue correctly, I bet setting the left margin instead of left padding would work a lot better...is this screenshot close to what you're trying to accomplish? If so, you could replace your button.sty...
ryandeba
Hi @kewilson, This is a bit difficult to work with without a live code example (like a jsfiddle demo), but I'm seeing a few issues:let buttons = editor.Modal.getElementsByTagName("button") || {};This is probably throwing an error since edi...
kewilson
ok so button.style.paddingLeft = "30px"; works but I've noticed that the border area where the buttons reside don't distinguish between the two .. i.e., no button border around each button's text. Because the Export ZIP button is not under...
#854February 9, 2018by chiqui3d3 answers
I don't see any basic blocks that you can create a table. Even if I do the block, it is impossible to edit the text. Block example with this option I can't modify the content of each td and they don't give me the options to duplicate columns or rows. @artf you plan to create a table block?
chiqui3d
enveloping the th text in a paragraph, works well. but as I said before you plan to add custom table options, for the borders and general table color.
ionic666
@chiqui3d hi,can you tell me how to deal with table-block
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
#853February 9, 2018by JulyanoF3 answers
I'm trying to create two inputs (width and backgound-color) to template's body and I would like to fix it in Panel's view. When a component is selected, these two inputs must be there. How can I do it?
artf
@JulyanoF so you just need to style the wrapper?!?
JulyanoF
I guess its the body and no wrapper I need to style. I would like to use colorpicker too, like style manager
artf
Like the current public demo which allows updating the body's background?