GrapesJS Issues

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

569 issues found

๐Ÿ” canvas
#816January 29, 2018by arthuralmeidap3 answers
3 reactions

[QUESTION] Adds image block trough Editor API

Hi @artf , When I drag and drop a Image block within the canvas it triggers the active event for the image block thats runs the openModal method. Shows a modal to upload the image. I'm trying to run editor.addComponents({ type: 'image' }); and shows the modal to upload the image. I didn't find any API methods that pro...

arthuralmeidap

yes, you are right @artf . I didn't think about dumb cases like that you mentioned. It worked very fine to me. I just thought if was not the case to embedded such behaviour within the addComponents or somewhere else. Thanks for all the hel...

arthuralmeidap

@chiqui3d, thanks for the feedback but the image block was just an example. In my case I have created a new Type and I was trying to trigger the active event for my component. It works exactly like the image block that's why I used the ima...

chiqui3d

I think this will help you. editor.runCommand('open-assets'); https://github.com/artf/grapesjs/wiki/Assets

#809January 26, 2018by maxtacco3 answers
0 reactions

[Bug]: CSS not added when blocks are drag and dropped after core:canvas-clear command invoked

I'm using grapesjs-blocks-basic plugin that has a number of column blocks. When I drag and drop these blocs onto the canvas they are displayed correctly for the first time and I can see the associated CSS added in the code viewer. But, once I invoke 'core:canvas-clear' command and drag-and drop the same blocks they ar...

artf

I just merged https://github.com/artf/grapesjs-blocks-basic/pull/4 which solves the issue. I'll publish soon a new release of the plugin

artf

Done https://github.com/artf/grapesjs-blocks-basic/releases/tag/v0.1.3

maxtacco

Thank you!

#808January 26, 2018by austinbiggs3 answers
1 reactions

[Question] Create space where component would drop

As mentioned in the title (which may be a bit confusing), I'm curious about how to create a space where component would drop. This is very common in implementations of dragging/sorting I've seen. (eg. https://shopify.github.io/draggable/ and jQuery Sortable) From what I understand of the drop placeholder (green bar in...

bogdansmadici

Hello @austinbiggs, any updates about this? Thank you!

artf

From what I understand of the drop placeholder (green bar in attachment), it's in a separate "Layer" and actually lives outside the canvas. I want to implement a better drop placeholder, I'm just not sure where to start when implementing t...

alimajed93

Hello @austinbiggs , I am interested in the feature you mentioned above, so any updates? Did you start and manage to do it? Thank you.

#806January 26, 2018by chiqui3d1 answer
0 reactions

[Bug]: the arrows on the extra transform block don't work

Hello! As I say in the title the arrows to increase or decrease the rotation of any element in the canvas does not work. Nor does it work to modify the color in transitions. All this in the extra section of the block manager Thanks!!

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#796January 25, 2018by kickbk3 answers
1 reactions

Can't drag component into canvas after styled element is cloned

Go to any of the demo, select a text box, give it a background color. Clone it. Then try to drag in another text component and it doesn't let you.

artf

Thanks @kickbk now I get it. It was already fixed here #779 and will be available in the next release

artf

@kickbk I can't reproduce it, but I think I'm doing something wrong, can you provide a screencast/gif of the behavior? (or anyone who faces the same issue) Thanks

kickbk

Using Mac Chrome. Same on Safari and FF.

#795January 25, 2018by chiqui3d3 answers
3 reactions

editor.getSelected() in run:open-assets

Hello! I want without having to create a new block button, and stopping the event associated to the image that this run:open-assets get the area created by the editor in the canvas and add there the image that I got with my personalized modal image. I want to clarify that when I double-click on the image inside the ca...

artf

Pay attention to the current command Your command should be something like this

artf

Apologize @chiqui3d but try to elaborate better, because I didn't get a single statement of what you're asking

chiqui3d

Yes @artf , you're right, I just updated it, I hope it's understood now.

#766January 16, 2018by austinbiggs2 answers
0 reactions

When clicking elsewhere on canvas, deselect: currently selected

Currently, once a user selects any element, there's no way to deselect that element. For example, if I'm editing a photo, but I want to "stop editing" the photo, there's no way to remove the selection from the photo (clicking on a non-editable element or the page background). editor.select( null );

artf

Hi Austin, can you explain which is your issue with a selected component? I've seen a lot of builders with the same behavior so honestly, I don't see it as a problem. By the way, I think you could implement something on your own, with edit...

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#754January 12, 2018by punkt22 answers
1 reactions

ES6 class in component script

I would like to use ES6 classes in the components script attribute. When I drop the component onto the canvas the error message "_classCallCheck is not defined" appears. Component code: Error message:

punkt2

I solved the problem. It turns out babel is transforming the javascript class and calls the helper function classCallCheck which is not passed to grapesjs. In the latest version (7) of babel, you can enable the loose mode for the transform...

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#720January 5, 2018by krunal0393 answers
0 reactions

Document Dirty Indicator

I want to display document dirty indicator unless document is saved to database. I have custom button on editor to save html to db I tried below #551 but it only fires while loading html from db to canvas and it does not fire for any changes afterward. editor.on('change:changesCount', () => { const editorModel = edito...

artf

Tried this in the demo and works as expected

austinbiggs

@artf - I tried this in my code an nothing happens. This works for you? I'm running v. 12.58 ๐Ÿ˜„

artf

This works for you? Yeah, it works with the demo (which uses the latest version)I tried this in my code an nothing happens Have you tried to change the structure of the template?

#716January 5, 2018by krunal0393 answers
3 reactions

Not allow selective Image resize

I do not want user to resize image on specific area of template, but want to allow anywhere on canvas. I want user to just choose image and does not allow to resize for specific class/element.

artf

You probably need to do something like this on render

faruk247

each((el, i, $els), it create error. Just replace by each( function(el, i, $els) complete code: var wrappers = editor.DomComponents.getWrapper(); wrappers.view.$el.find('.rm-editable img').each( function(el, i, $els) { var $el = $els.eq(i)...

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.