GrapesJS Issues

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

1180 issues found

#2836June 16, 2020by RJCAM1 answer
1 reactions

[BUG]: Unable to add class when adding Dom Component

GrapesJS Version used: 0.16.12 (current) Just a strange behavior, I can add all the attributes I want when adding component directly inside canvas using dom components add function (like code below) but the editor always remove the class. The class is only added if we create the component first and then assign a class...

artf

Yeah, you have to use classes property, but I agree that is confusing (that because classes are treated a bit differently), so I'll try to make the initialization possible also with attributes.class value

#2835June 16, 2020by letstri1 answer
1 reactions

[BUG] Outside Shadow type is not applied

Got to https://grapesjs.com/demo.htmlSelect any itemAdd box-shadowSet box-shadow to insideSet box-shadow to outside Video: https://take.ms/9aFjz

artf

@BrooonS thanks, I'll check it out

#2834June 16, 2020by kuhelbeher3 answers
6 reactions

[BUG] Grapesjs doesn't initialize styles for wrapper

Hello, I've met a bug where grapesjs doesn't initialize styles for wrapper. Steps to reproduce:Go to https://grapesjs.com/demo.html Select wrapper and set background. It will add "body" rule to styles and it will be displayed in style settingsRefresh the page - "body" rule still present (you can check it in "View Code...

bryanjamesmiller

This seems to fix the issue: Any reason not to do this @artf ?

Jowcey

Hey, this issue is still persisting. The Classes and CSS added to the body layer (wrapper) get wiped every time it's restarted. It seems to be that the ID get's randomised and that's why the CSS breaks, but unsure why the class gets cleare...

aakash2610

I am facing the same issue. Is there any workaround for this issue suggested by grapesjs team? Meanwhile, is there any timeline for fixing this issue?

#2831June 15, 2020by mustahsanmustafa2 answers
1 reactions

[BUG] Text components don't behave correctly after creating custom components

Hi artf, After creating custom components, the text component does not behave like before. It removes all the naked nodes after changing some code in import modal. e.g After editing something in import modal it gets change to: As you can see it removed the Naked text node i.e Insert your text. It should be noted that...

artf

You're mixing the old API with the new one for the custom component definition. With model: defaultModel.extend({ was required an inner static isComponent (you're using one outside, like in the new API) and without it, you're breaking the...

mustahsanmustafa

UPDATE: If i just extend my custom components from textnode instead of default, then the issue gets resolved somehow: but it will be better if the issue is resolved at default as well. cheers

#2828June 12, 2020by kuhelbeher3 answers
0 reactions

[BUG] Problem with link and CKEditor

There is a problem with link and CKEditor. I enabled editable property for <a> tags: And when I doubleclick on the link it is editable, all works as it should. But when I finish editing and trying to edit it again I cannot do it. Can you help with this?

artf

Please create a reproducible demo

kuhelbeher

@artf Here it is: https://codesandbox.io/s/link-ckeditor-8md7v?file=/src/index.js

artf

I see how the contenteditable remains false which is the reason of the bug but I'm not sure what is the cause. It might also be the CKEditor which prevents the propagation for some reason. If someone is willing to help I'd really appreciat...

#2822June 11, 2020by Lighost2 answers
0 reactions

[BUG] SVG is not visible in editor

Hello, I have needed to put svg into my project so I used custom code component for this purpose. But when I copy svg content into component it shows nothing. But when I look at generated index the svg is visible. I have tried same thing in demo editor, but there it is not visible in editor and also at preview mode. I...

RJCAM

Hello @Lighost I think the issue is with that svg because this is the only that isn't working properly. This can have some code that are not being understood properly by the Custom Block itself. One solution is to save the svg locally and...

Lighost

@RJCAM Yes I know, I have already did this, like inserted SVG as img. But in my case I really need insert it as svg object – because I have to do some hover effects with fill attribute. In any case, somehow it has started be visible in edi...

#2812June 1, 2020by BerkeAras2 answers
1 reactions

[BUG]: Cannot place button

Hello. In the latest version it is not possible to drag and drop a button. It gives this error: `Invalid target position: Target collection not found, Target is not droppable, accepts [undefined], Component not draggable, acceptable by [undefined]`

RJCAM

@BerkeAras the default button inside the Form category is only droppable inside a form block (the first block inside Form category). All those blocks are allowed to be dropped inside a form only. If you want a button to be dropped inside a...

BerkeAras

Thank you!

#2811May 30, 2020by BerkeAras3 answers
1 reactions

[BUG]: Failed to execute 'appendChild' on 'Node'

Hello. I am getting this error in the console: Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. What could this be?

BerkeAras

@artf I'm sorry, for my issue. The bug is fixed. The problem was because I tried to remove the settings pane, but there was a typography mistake.

RJCAM

You need to be more specific in what your trying to do and how are you getting this error.

BerkeAras

I don't do anything. If I just place GrapesJS on my page, this happens.

#2807May 27, 2020by alesub3 answers
0 reactions

[Bug]: Starting editor "fromElement" creates components inside tag with data-gjs-type="text"

Hi, I'm currently trying to start the editor "fromElement", setting the following html inside the container: But when executed, grapesjs creates components inside the <p> tag even after setting the data-gjs-type attribute as text. What I'm trying to do is to present the paragraph to be edited as a single component. Yo...

alesub

@artf just to clarify: this bug is based on the expected behaviour you described on this comment: https://github.com/artf/grapesjs/issues/576#issuecomment-348550694 And how the divs with text behave on the demo page. Please let me know if...

alesub

Hi, any luck reviewing this issue? What got me lost is this doesn't happen on the demo page, any bold or italic text doesn't become a separate component after saving or reloading. Any insight will be greatly appreciated, Thanks!

artf

Closing this one as now this is the default behavior. There is also a possibility to customize the behavior via disableTextInnerChilds option added from https://github.com/GrapesJS/grapesjs/releases/tag/v0.21.2

#2805May 27, 2020by EgorPashko3 answers
6 reactions

[QUESTION] "Changes you made may not be saved." alert popup is displayed

Hey guys I have some problem related to alert which displayed when I tried log out of page. Actually I do not know bug is it or something else. I have read documentation, but did not get answer yet. If you help me I will gratefully to you. Alert message is "Changes you made may not be saved."

Ju99ernaut

I guess the alert still shows up even if you have storage set up. Add this to your initialization: By default it's set to true

Ju99ernaut

It's probably because you have no storage set up

pjdevries

I thought about storage as well and was about to set up a dummy storage, hoping it would circumvent the problem. The noticeOnUnload: 0 works like a charm though, so no need for that. Thank you very much.