GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#2065June 5, 2019by Amir28283 answers
0 reactions

Few Questions

First of all, Amazing project thumbs up to everybody involved. I have a couple of questions:How can I iterate over all of the components and change their content on the canvas. I would like to implement a find and replace function that will replace a specific string in all of the Elements inside the canvas. Is there a...

Amir2828

Ok I Managed to solve the 1st problem. I used get components and recursively iterated on the tree. When I finished I used the DomComponents.render() Still looking for some direction regarding the 2nd question

Amir2828

Ok I think I also managed to figure out the 2nd question. I injected to the Canvas JQuery script which made the Accordions and Sliders Behave as expected.

Amitkumar85533

Hi @Amir2828 , Can you tell me about the accordion? Can you give a small example?

#2064June 4, 2019by Moikapy2 answers
0 reactions

Issue Starting and building GrapesJS

I Clone, Downloaded/Unzipped, & checked out into an upstream I have in my fork to preview the changes and for some reason, they are failing 456 of the tests when I try to build and I get this error in the console.

verdverm

I can verify the same tests results as well, I came across a TODO somewhere about making all these pass.

artf

@Moikapy ok thanks, seems like the same issue of #2044 I close this, let's keep talking there

#2063June 3, 2019by benvmatheson3 answers
3 reactions

[Question] Can I disable media queries?

Is it possible to disable media queries? E.g. turn this: @media (max-width: 331px){ .image-block{ position:absolute; top:0; } .c976{ width:331px; height:526px; position:absolute; } } Into this: .image-block{ position:absolute; top:0; } .c976{ width:331px; height:526px; position:absolute; }

artf

Yes, you can use this option: https://github.com/artf/grapesjs/blob/60c1755c57da02b57988fbe0e1a0321a5395728c/src/editor/config/config.js#L90-L93

benvmatheson

I could remove these programmatically, but is it possible to tell grapes not to add media queries to CSS?

benvmatheson

We're needing to allow selecting device sizes while editing, but need to remove media queries. As this is a bit of an edge case, I'm assuming I should expect media queries to always be applied if in device preview mode?

#2061June 2, 2019by froderf3 answers
0 reactions

[QUESTION] How to place a component at the end of the canvas.

How can I put my footer at the end of the canvas? I want the editor to not allow placing a block/widget below the footer. example

artf

You can use something like this

froderf

@artf Do we have something like removeAdjacentHTML() editor.getWrapper().getEl().removeAdjacentHTML('afterEnd', footer); because when we used it keeps duplicating every after you reload the window. -------------- I'm looking for a way to s...

artf

Do we have something like removeAdjacentHTML() getEl() gives you the HTMLElement instance so insertAdjacentHTML is from DOM API, not GrapesJSit keeps duplicating every after you reload the window. ... can you create a reproducible demo?

#2059June 1, 2019by adamwpe2 answers
0 reactions

Custom block does not appear selected

It appears when adding a custom block to the block manager, if you past it a content object, when selected, it does not appear selected (With the blue box around the component): An example of my code is here: Example: https://jsfiddle.net/v5k4jqfg/1/ Is there any way to show the selected blue box?

verdverm

I bet it's some configuration value, though I'm new to grapes and don't know the answer yet... :[

artf

Remove the custom tag tagName: 'doesnotappear_selected'

#2057May 31, 2019by alikabeer322 answers
1 reactions

Media Queries do not apply on a custom block I wrote

I wrote a simple div block like so blockManager.add('simple-div', { label: 'Container', content: '"<!––<div class="simple-div"></div> ––>"', category: 'Basic', attributes: { title: 'Simple Box', class: 'fa fa-square' } }); But it is NOT responsive whatsoever. This is how it is: 1.I set it's width 100% on desktop 2.I s...

alikabeer32

@alikabeer32 I'm facing the same issue. If you solved this issue. Can you please share the solution here. Thanks @umerrinayat I don't remember what I did but try the following: You need to define the css class and add a unique id to it ```...

umerrinayat

@alikabeer32 I'm facing the same issue. If you solved this issue. Can you please share the solution here. Thanks

#2056May 31, 2019by Bhavana201 answer
0 reactions

[QUESTION]: Custom Asset Manager Layout

Hi, We are trying to modify the Asset manager layout, to match our requirement below. Requirement:User double clicks on the image or adds a new image or any other option that opens the Asset manager, there should be a popup with the options: (Point1.png)Select from existing list from the server. (Point1AB.png)Select f...

artf

For such custom behaviour, I'd suggest replacing the built-in Asset Manager panel with your own

#2055May 31, 2019by zhangyanwei3 answers
5 reactions

[QUESTION]: How to remove the components correctly?

I want to remove the components programmatically, the following is my code snippet. After the components have been removed, then undo the delete actions (Ctrl + Z), do the multiple selections with the shift key will get the error Uncaught TypeError: Cannot read property 'indexOf' of undefined. My question is: How to r...

zhangyanwei

I've tried calling setSelected method before removing components, it works! Here is the updated code:

zhangyanwei

@joselin-bizmatesph I haven't been touching it for 3 years, but I guess it's similar to the case I had encountered. From the snapshot you posted, seems you removed the wrong components and you might need to double check the rowspan and the...

bizmatesph-joselin-macayanan

@zhangyanwei I encountered the same issue, I have some issues when I try to merge the cell from bottom to top. Have you already fixed the issue?