GrapesJS Issues

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

3464 issues found

#2043May 28, 2019by megarg1 answer
0 reactions

[QUESTIONS] Adding custom component does not work

I have done a lot of research but still could not add a custom component. I tried the example in official docs (to modify behavior of "input" element and it is working fine). https://grapesjs.com/docs/modules/Components.html#define-new-component But the above example is for modifying existing component ("input"). I am...

artf

First of all, use the improved API. The isComponent is triggered only if you need to parse an HTML string, if you pass the component object (eg. { type: 'input2', }) the parsing is not necessary. You don't see anything in the canvas becaus...

#2041May 28, 2019by EthanM111221 answer
0 reactions

[Question/Feature Request] Licence info is missing?

Hi, While reading the licencing requirements for this project and also grapesjs-preset-newsletter project the licence states that the disclaimer must be referenced/included in the output source/binary files. To meet this need should the source js not include a reference similar to this example, or have I misinterprete...

artf

While reading the licencing requirements for this project and also grapesjs-preset-newsletter project the licence states that the disclaimer must be referenced/included in the output source/binary files. I think that sentence might be a su...

#2040May 28, 2019by dizzydes3 answers
0 reactions

GrapeJS plugin developer wanted

Looking to develop a plugin and would like to hire an experienced GrapeJS plugin developer on a contract basis for this work. Please respond or dm or email (below) if you’re interested and we can chat.

artf

@dizzydes try also to post your offer in the dedicated channel on discord chat

dizzydes

Will do Artur thanks. Thanks, Des Sent from my iPhone On 30 May 2019, at 00:30, Artur Arseniev <[email protected]> wrote: Closed #2040. — You are receiving this because you were mentioned. Reply to this email directly, view it on Gi...

GoodPHP

https://devfuture.pro/grapesjs-development/

#2039May 27, 2019by faaizalikhan13 answers
0 reactions

[QUESTIONS] How can I update the styles of a class?

Hi, so I have this button, whose style changes when hovered, a new class is added: <button class="btn btnhovered">Button 1</button> <button class="btn">Button 2</button> Is there a way I can change the styles of a particular class? If I wanted to add a custom color to the "btnhovered" class? Any help appreciated, than...

artf

To get the rule with that class use CssComposer.getRule and once you have the rule update its style

faaizalikhan1

@artf Hi, I am trying to access with that statement, but I get null as a response, what could be the issue?

artf

Well, the rule should be there at first. If you're using canvas.styles option in your init method those are not appended inside CssComposer, so you have to add it first.

#2038May 25, 2019by Apetrou3 answers
0 reactions

Buttons flashing with question mark and non responsive.

Hi, I'm having issues using this library, firstly some buttons are missing their icons and are flashing when clicking on them they are not responsive. E.g.: Aswell when I select certain elements on the page some white blobs appear. E.g: For reference i am using the preset newsletter plugin however I have tried without...

artf

@Apetrou I think you're missing some files (those white blobs seems to be huge toolbar icons, so the font-size seems to be changed). Try to start from the file used for the demo https://github.com/artf/grapesjs/blob/gh-pages/demo-newslette...

umer936

I also have this problem. I am trying to include it in a CakePHP application. If I run my same gjs includes and scripts on a simple HTML file from my desktop, it works as expected - meaning it is not a missing include. However, including t...

umer936

Okay. After lots of trial and error, the issue is that I am already including font-awesome in my header. Unfortunately, I cannot remove font-awesome from there as I use it in many places.

#2037May 25, 2019by fmr4111 answer
0 reactions

[QUESTIONS] Toolbar error position when adding elements

I made canvas in modal, but there were a few bugs, when I added a new component, the position of the toolbar went down, the top canvas value that was initially 0 changed (console.log (r.canvasTop) in grapesjs.min.js), but when I resized the browser, everything was normal again (the bug only happens every time the page...

artf

If you encounter an error, open the issue as a bug, please. So follow the template for the bug.

#2036May 24, 2019by Gummibeer1 answer
1 reactions

[QUESTION] documentation of stored object structure

Hey, I would like to incorporate this package with my existing element based backend. To do so I would need to map the data posted to the remote storage server into my own data structure and during load also back to grapesjs structure. So for a super basic example I've took the simple heading element <h1> which is als...

artf

You can see all the Component's properties here: https://grapesjs.com/docs/api/component.html#component and none of them are required

#2035May 24, 2019by MetalPinguinIncNo answers
0 reactions

[BUG] (Un)selecting a class in the StyleManager throws a TypeError

Hello, I am running into an issue when selecting or unselecting a class on an element in the StyleManager through the UI. This happens on both my own project and the newletter demo from the GrapesJS page. It happens on version 0.14.61 which should be the current version. Reproduction:Open the newletter demo from the G...

#2034May 24, 2019by sdrebel1 answer
1 reactions

[QUESTIONS] How to remove trait fields dynamically?

Hi @artf , I have a drop down with few options. Based on the selection fields are getting generated using addTrait. Similar way is there any removeTrait function? Ex: If I choose Option1, 'field-1' will be generated. If I choose Option2, 'field-1' should be removed and 'field-2' should be added .

sdrebel

Found the solutions in the updated dev versions. component.removeTrait('title');

#2033May 24, 2019by charlieshum11 answer
1 reactions

[QUESTIONS] How to change the style of the outline of selected components

Hi @artf I can change the style of outline of a hovered component with .gjs-cv-canvas .gjs-highlighter { ...... } How can I change the outline style of a selected component? I cannot apply the style using '.gjs-comp-selected' Also, how can I change the style of the component type/name label of hovered/selected compone...

artf

Only selected component style is inside the canvas, so you have to use canvasCss option https://github.com/artf/grapesjs/blob/8915ae417bed25a4834b34d8f0ecc08f0e03fd64/src/editor/config/config.js#L74-L78 for the rest, you can use simple CSS...