GrapesJS Issues

3,464 parsed GitHub issues โ€” 370 solved ยท 90 open. Search, filter and explore battle-tested answers.

569 issues found

๐Ÿ” canvas
#2482December 31, 2019by andrewryan19063 answers
0 reactions

How do I change the name of the default component?

I noticed everywhere in the canvas "Box" is the term for the default container. I'd like to change that I found the customLabel strategy function on the canvas; that works, but as soon as I implement it, I lose the default behavior for labelling everywhere else in the template designer. Don't want that. Really, what I...

artf

You can do it by updating the i18n string

andrewryan1906

Outstanding! Thanks.

andrewryan1906

Hey... this works, but nulls out all of the other names. How do I override just that name?

#2481December 30, 2019by andrewryan19061 answer
1 reactions

Unable to use Font Awesome Icons inside of the Canvas

First off, great work on an amazing project. Can't believe this exists. OK, I've spent the last few days going through the docs and now am starting to build my own components. However; for template design, I want my components to render differently. I can see that I can intercept the rendering and change that. But I'm...

andrewryan1906

I actually discovered the problem halfway through writing the post but decided to finish it and leave it here in case anyone ran into this. The styles used for panels, blocks, etc don't apply to the styles inside of the canvas, since the c...

#2472December 26, 2019by imranali20452 answers
0 reactions

DragData extend for other components like div etc

Hi @artf How to implement dragData event for custom components(external).I called dragData method on div drag but dataTransfer and content has no information of current drag component.Please help me its urgent thanks. this._editor.on('canvas:dragdata', (dataTransfer, content) => { console.log('dataTransfer', dataTrans...

artf

canvas:dragdata is meant to be used to enrich the Native D&D support. If for example, you drag into the canvas a video from your desktop and want the editor to understand it correctly, you would do something like this

manuel-84

have you managed to do this? i have problems with dropped text with mjml plugin enabled, it should create a mj-text element, instead it's creating a div

#2467December 23, 2019by jcamejo2 answers
0 reactions

[ISSUE] [SOLUTION PROPOSAL] Color picker remains open if the click happens on the canvas

Hi @artf, i hope you are doing good. I'm seeing some issues around the color picker, if one is open and afterwards a click is made on the canvas, the color picker will not close even if the option clickoutFiresChange of the plugin is set to true, this is because the event propagation is taken by the iframe of the canv...

artf

The PR would be great ๐Ÿ‘

NorthstarTech

@artf @jcamejo any update on this?

#2458December 17, 2019by angyLe3 answers
0 reactions

[Question] Setting of default value for css property in StyleManager config does not affect style of new added block?

I have a question. When css property is added to StyleManager configuration, for example I added color and set defaults to green (just for test): name: 'Typography', open: false, buildProps: ['color'], properties:[{ name: 'Font color', property: 'color', defaults: "green"}, โ€ฆ Looks like it does not affect text color o...

artf

Hi @angyLe the style manager just builds properties, in a kind of "blind-way", and some of their properties don't affect directly the target (component/rule). In this case the defaults it's more like a hint to show to the user when the pro...

angyLe

I didn't want to make properties different then in specification. I just wanted to set default value for existing properties. For example i want that width of the text box will be 100px, so when it is added to canvas it will be 100px . I t...

balchen

@artf I'm sorry, I couldn't understand your answer (@angyLe and I work together on implementing grapesjs in our system, so I know what the question was). When I read your answer, it is my understanding that you are saying the following: 1)...

#2444December 4, 2019by MariusDK1 answer
0 reactions

Set charset of canvas or grapesjs to UTF-8

Hey @artf , How to get UTF-8 encoding from canvas in angular 8. I need this because i encode btoa from frontend and send to server. Server use base64 to decode with UTF-8 and special characters like spanish are not recognized by server. Please help me.

artf

Hi @MariusDK the iframe in the canvas doesn't use any particular charset so it should depend on the parent page or at least, due to HTML5, be in UTF-8 FYI, if you need to get the iframe element (for any kind of manipulation) you can do thi...

#2426November 25, 2019by Hovius2 answers
3 reactions

[Question] How to handle old components (json) with new editor configuration?

Hello @artf , I have a question about the grapes editor that I can not find in the documentation, so I hope you have an answer. Basic setup: The configuration of all components is set with the init this.editor = grapesjs.init(defaultConfiguration); The components from an earlier saved json are added with setComponents...

artf

Can the editor pick up on the new component config without having to add a new component to the canvas manually? Not really, if you store the component definition in one way, the editor will load that definition. One only thing I can sugge...

Hovius

Thanks for your response! I'm going to use avoidDefaults: true and make it work :)

#2423November 23, 2019by MartinPutz2 answers
0 reactions

[BUG] In absolute dragmode the components are not dropped properly if zoom is applied

Components are not dropped to the exact position if dragmode set to absolute and there is a zoom value applied on the canvas. GrapesJS version:0.15.8 The issue can be reproduced in the demo as well: https://jsfiddle.net/y8m1x4a3/ Expected behavior: Components can be dropped to the cursor position even if the dragmode...

artf

Should be fixed in this branch https://github.com/artf/grapesjs/tree/multi-frame Multi framing is still far from being complete but I hope to merge soon that branch (big canvas refactoring but without breaking changes), definitely not for...

artf

I close this issue as I'm planning to solve all ones related to absolute positioning here: https://github.com/artf/grapesjs/issues/3770

#2422November 23, 2019by MartinPutz3 answers
2 reactions

[BUG] Unable to add 'space' character if zoom is applied on canvas

Cannot edit text components properly if a zoom value is applied on the canvas. GrapesJS version:0.15.8 The issue can be reproduced in the demo as well: https://jsfiddle.net/1n9ruwa4/ Expected behavior: Zoom is applied on canvas using:editor.Canvas.setZoom() The text components can be still edited and 'space'(Keycode:3...

mattdeigh

Ahhh, I see it now. Wasn't tracking with the code completely. I'll play around with that and let you know what I come up with.

Sphenox

I'm writing on this issue, since you can't add a 'space', if you are focused on an <a> or a <button>. It is reproducable in the demo, if you add a Link: https://jsfiddle.net/1n9ruwa4/ Reason is because of the notTextable config from the ca...

artf

Thanks @MartinPutz good catch

#2421November 20, 2019by brentonkelly19822 answers
1 reactions

[BUG] Number Trait Type Adds Attributes to Element

Working Example: https://codepen.io/brenton-kelly/pen/wvvOgLN On the latest versions: https://unpkg.com/grapesjs https://unpkg.com/grapesjs/dist/css/grapes.min.css I created a grid component where the user will set the number of columns and the gutter via trait manager. When I use the "number" type for the traits, my...

artf

You forgot changeProp: 1 in your traits

brentonkelly1982

Thank you!