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.
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.
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
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');
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...
@artf you closed my issue before I approved that the answer is correct. I want grape js not to wrap the link with any block(link, text etc.). Is it possible?
artf
Please avoid opening new issues to continue the discussion of another...
For example, I want to create a complex custom navbar block. It has several first level navigations, and each of one also has several second level navigations. The data of navbar is loaded from database. And when I drag it to the canvas, I can modify properties in trait to change the data navbar loaded. Also, when I e...
artf
Sure, but in that case, I'd suggest you create a custom component. Here an example/pseudo-code of triggering an async function for changing the component content
Hi @artf , We got a report that when you import some HTML code with incorrect attributes, such as <td class="cell" 01234="0" >Hello world! </td> grapes.js throws the following Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '01234' is not a valid attribute name. at HTMLTableCellElement.<anonymous...
arachnosoft
Just to keep you informed, I applied the try/catch fix suggested by @ankx06 and @artf to our code, but in a generic way. I wanted to ensure that the exception would be catched in all cases when setComponents() is being called. Either from...
ankx06
@jmchaves this is not called from any event. This is the function to update component's inner components/html.
ankx06
I have also faced this issue while setting an invalid attribute/style for image height/width. Currently, I have handled using a try-catch block If the newContent has multiple components and only one component have the error, due to excepti...
Hi @artf , I have a custom component with custom traits. When I select the option from the dropdown, more fields needs to be added based on the selection. How do I do it? Dropdown Extra fields Code is below, I have added the listener but not getting the option to add new fields to the current trait setting. DomComps.a...
sdrebel
I have tried this below code and it's adding in the traits array. But not reflecting in the editor. domComps.getType('linking').model.prototype.defaults.traits.push({ name: 'product' })
sdrebel
Found the solution from the latest code. this.addTrait({ type: 'checkbox', name: 'muted' })
Hi! I have a question, I searched but couldn't find an answer, is there a component that pulls in an RSS feed and formats it on the page. MailChimp and Campaign Monitor do this, here is an example feed: http://www.homecaredaily.com/feed/ I realize some of this is done server side, but just looking to see if anyone has...
artf
Hi Shaun, I think it should not be that complex to implement if you read how Components and Traits work. It should be something like this (take it as a pseudo-code): then add a block to let users drag it in the canvas