GrapesJS Issues

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

3464 issues found

#1716January 8, 2019by chiqui3d3 answers
0 reactions

Block in Pannels?

I'm looking for a way to add a group of blocks to a custom panel, I'm talking about blocks and not buttons because they need to be "Drag and Drop"? What possibilities do I have?

artf

Hi @chiqui3d you can tell the editor when to append blocks at initialization: and then using the BlockManager.render method (check the example) to render filtered blocks

chiqui3d

Thank you @artf , but I still see that this is only valid for one panel, I do not see the way to have two panels, one for some blocks with their categories and another to have other blocks with other categories. This makes it impossible fo...

chiqui3d

Isn't there any way to have two panels with different blocks?

#1715January 7, 2019by JulioDavidMartinez3 answers
0 reactions

Hello, I am new to your project, but I love it. I have a small issue with image attributes.

I added two new traits to the trait manager for images. Width and height. I added it as a plugin following your example. It totally works and lets me edit the image attributes for width and height. The problem is that now the asset manager doesn't work any more. If I disable my changes then the asset manager works aga...

arthuralmeidap

Try to override from the image type itself instead of default type

artf

As already mentioned by @arthuralmeidap you have to extend the image component. So in your case (by using the latest grapesjs version) it could just be:

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.

#1714January 7, 2019by chiqui3d3 answers
0 reactions

auto select componet in RTE

When I add a link from RTE, it is not selected as the link component, I have to deselect the parent component that is the TEXT and select again, because this does not do it directly? I thought the advantage of RTE was that, that if I add a component from RTE the TRAIT options of that component will be shown. Not that...

chiqui3d

I don't know if it's the right way, but I got it this way:

artf

I thought the advantage of RTE was that, that if I add a component from RTE the TRAIT options of that component will be shown. Not that I have to exit the TEXT again :( You're right @chiqui3d but when you're editing, the HTML text is "flat...

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.

#1713January 7, 2019by adamlc2 answers
0 reactions

Deleting Elements - Newsletter Demo

On the newsletter certain elements can't be removed. Try removing the "Free and Open source" button or the grapes logo for example. I'm also getting this issue on my local grapes too. Weirdly if you try to drag the element, but not move it anywhere it then lets you remove it. Using Chrome 71 on macOS. Hope that makes...

artf

Hi @adamlc this one is related to #1699

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.

#1712January 6, 2019by froderf3 answers
0 reactions

Header and footer

I'm thinking about adding multiple page with header and footer Currently I have an idea on how to implement the multiple page but I don't know how to implement header and footer. With the current Api methods, seems there is no work around for this please help to resolve this issue, since upon checking the issue there...

froderf

Header and footer should be same to all pages

artf

You have to use Custom Components example https://jsfiddle.net/5vcc3en6/

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.

#1711January 5, 2019by fulus063 answers
0 reactions

Error in prompt position after moving canvas

1、移动画布 2、点击layerManager(如果不点击layerManager 不会出错) 3、画布里的提示框位置出错 1、 moving canvas 2、 click layerManager (If you don't click layerManager, it won't go wrong.) 3、 The position of the tip box of the picture is wrong.

artf

Thanks for the report @fulus06 can you provide a reproducible demo on https://jsfiddle.net/, please?

fulus06

@artf https://jsfiddle.net/fulus06/kqsezd0c/5/

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.

#1709January 4, 2019by cmoutafidis2 answers
0 reactions

[QUESTION] Is it possible to affect child component's styling through parent component's style manager?

Hello there! Awesome project and thanks for your contribution. I would like to know if it is possible to change the styling of a child component through it's parent's style manager. For example, I have a block of components. The parent component contains all the other components. By clicking the parent component and g...

artf

It might be a bit tricky but yeah, you can do it. For sure you have to create a custom Component and inside its init method (model) you would place listeners to traits/styles. Then, inside the callback method, of the listener, you'd use fi...

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.

#1708January 4, 2019by charlietoleary3 answers
0 reactions

StyleManager events fire multiple times per change

To reproduce: On a fresh install of GrapesJS, within the demo page (within index.html), add an event listener like so: editor.on('component:styleUpdate:width', (model) => { console.log(model); });Issue: When changing the 'width' value of any element, the 'model' variable will be printed multiple times. The issue seems...

khbhr

Hello, I am having the same problem and since that it is not solved yet, it would be a solution to use the debounce technique. check this example.

ajumell

Hello, I also found this issue. The event is firing even without changing the width I added the following code to the html page and the log is generated multiple times. editor.on('component:styleUpdate:width', (model) => { console.log('Com...

artf

I think the fix is already available on the dev branch (so ready for the next release) https://github.com/artf/grapesjs/blob/0dba07fd21b8e2dd953100bec5b7531f0761c9c2/src/style_manager/view/PropertyView.js#L411-L413 I see multiple events on...

#1707January 4, 2019by hemanthmc3 answers
3 reactions

Find images links in the editor

I am trying to integrate GrapesJs in reactJs. Can you please help me out with the below question w.r.t GrapesJs-React, • Is there a way to find the images link used inside the editor ?? example: when I drag and drop and image inside grapesjs editor it will create one image tag with image src path. So I want all all th...

maryia-kabash

Hi @hemanthmc I can suggest subscribing to sorter:drag:end event and pass a React method as a callback. In the method check if image is dropped and store its src into React state or do whatever needed. A more detailed example: this.grapesj...

hemanthmc

Thank you for your suggestion @maryia-kabash

artf

Component API: https://grapesjs.com/docs/api/component.html

#1706January 3, 2019by SeongwoonHong3 answers
1 reactions

[Question]: How to get href from rte?

I have this rte toolbar where you can type and click 'save' and it's going to create a link for the selected text. but the problem is that the value of the input field should be dynamic based on selected text. If the selected text has href and the input field should show the href in there. How do i get href for the se...

SeongwoonHong

@artf WOW you save my life!Thank you! I have no idea how many hours to figure this out by myself... thank you thank you! it's working now.....!

artf

rte.selection() returns the Selection object which you can use to detect the pointed node (from which you can get all the attributes you need)

SeongwoonHong

@artf Could you give me an example of doing it please? I've tried lots of stuff but couldn't find a way to get any attributes using rte.selection().... I really appreciated it Artur.