Expected Behavior: After deleting an element from the canvas that has received custom styles using the style manager, the deleted element's styles should no longer be saved in the styles JSON. Actual Behavior: The styles JSON retains entries for deleted elements on save. Steps to Reproduce:Fiddle based on the starter...
Hi, I know that we add the traits options or properties for any component blocks. but I don't know how to add the traits for canvas body. can anyone please help me. In the above image. under the settings options. I need to add one input and radio button.
artf
You can add them at run time https://grapesjs.com/docs/modules/Traits.html#updating-traits-at-run-time
Hi, Locally installed GrapesJS and the addon 'preset-webpage', which gets me a basic layout with some blocks. One of those blocks is the video block. I can drag&drop a video on the canvas, but am not able to set a youtube url. In the demo I see, in the right sidebar, a Settings option. I'm missing that one in my insta...
artf
No, the video component is part of the core, so if do this editor.addComponents({ type: 'video' }) even without any plugin you should see the video traits correctly
jeff-panart
Hi artf, Hmz, then I think I did something else wrong.. adding the editor.addComponents line, doesn't make any difference. In my index.php I only have a div with gjs as id, and here I also call some assets (stylesheet and grapesjs script f...
If I try to edit an element on the container is not appearing to be working or if I decide to be bold nothing at all. Chrome, IE are working fine only on Safari is the issue. This is my current settings: startGrapeJS : function() { var this = this; this.editor = grapesjs.init({ // Indicate where to init the editor. Yo...
If I drop an image that's larger than the canvas, then double click the top left anchor, the width is adjusted to the size of the canvas. Is there a way to programmatically call the same funciton, or would this need to be manually done in a listener? Is it also possible to fit to height as well, instead of just width?
MatthewMariner
Ben how did you fix this?
benvmatheson
@MatthewMariner I just had it add a max-width the size of the canvas. Wasn't able to figure out a better solution.
Hello, I am having the following problem when switching between Desktop view, tablet view and mobile view in GrapesJs: When the template contains an image, strips with the same "pattern" of the image appear when switching to a smaller view as shown below: Those lines will disappear when I inspect element, trying to ge...
artf
Seems the same issue of https://github.com/artf/grapesjs/issues/1240
Given the following code example... Results in no ability to scroll to top of canvas if editor display area is less than specified height of the device. See Fiddle for demonstration... https://jsfiddle.net/gstone007/0vq3o2jf/1/
ghost
Just add style overflow: auto to .gjs-cv-canvas__frames
artf
After exploring a bit more about this issue I'd suggest just not to exceed the canvas height with the device one. Unfortunately, currently, making any part of the canvas scrollable (solution suggested by @TheDiamondKing ) will lead to unex...
contentfree
@artf Is your comment still true? Does adding overflow: auto (especially in a "designer mode" / "absolute mode" canvas) still cause problems?
Hi, I have a custom component which content can be changed by switching trait select options, but also can be edited similar to the text component type when it is already rendered inside the canvas. Is there an easy way to reset the traits related attribute on edit of a component?
inaLar
@artf, regarding the "Select" I couldn't manage to connect the change in the content and make it work on change of the trait in one flow and also to change it manually by editing it's text/content. The manual change wasn't syncing the trai...
zgover
You could attach an event listener to the content prop of the component, then in the callback fetch the trait or change the value prop of the trait, see example below taken from docs
inaLar
Thank you Zachary1748, but I can't use that in my case. Maybe I didn't explained it right. I have a custom made component. The components content can be changed in 3 ways:When dragged and droped into the canvas (you have a popup with optio...
hi, Grapesjs is a fantastic bit of software and I've been playing with it for a week or so now. Im struggling a little with the urlLoad. Im using an end point which is returning json as you can see here: How I've read the documentation, is this supposed to load the layout into the canvas? What I'm trying to do, is use...
artf
The result of your endpoint is totally wrong. Read carefully this part please: https://grapesjs.com/docs/modules/Storage.html#setup-the-server You should return something like this: Now, you're returning only components:
Hi I'm trying to create an ordered list with grapesjs. I tried adding the following to the rte: And this works if my page is pre-filled with html when the editor is initialized, like below: Prefilled Editor: Create Ordered List: If, however, I drop a new block into the canvas, and then press the ordered list button, I...
thomas1204
From the above comments, I can now add ordered and unordered list. Is there any way to update existing ordered and unordered List ? @artf @rahuloftheramaneffect
artf
Can you create a reproducible demo, please? That error without a stack trace is useless(Optionally) we can use the tab key to indent the lists? You should definitely do it by yourself or rely on something like CKEditor for more advanced te...
rahuloftheramaneffect
Hey! Thanks for responding so quickly.Can you create a reproducible demo, please? That error without a stack trace is useless Here is a zip file containing a stripped down version of my editor page. Demo.zip It includes a bunch of css and...