GrapesJS Issues

3,464 parsed GitHub issues — 370 solved · 90 open. Search, filter and explore battle-tested answers.

569 issues found

🔍 canvas
#1439September 18, 2018by kickbk3 answers
1 reactions

Removing images from the canvas/LS when deleted from the AM

I upload an image with the assets manager which stores the image on the server. I select the image to insert into the canvas and it stores it in the LocalStorage. Great! Now I delete the image. It removes it from the server and from the Assets Manager. Great! I refresh the page. Since the image was used in the canvas,...

artf

Ok... @kickbk this is why I ask to specify all the info when you create new issues, so please, next time, do it btw those are different components, try this: wrapper.find('[data-gjs-type=mj-image][src="...."]')

artf

I am thinking the solution here could be that when we remove the image from AM it should also remove it from the canvas and LS. Ok, but this kind of logic it's only up to you, definitely not something we should add inside the coreMind you,...

kickbk

When I do wrapper.find(img[src="${src}"]) I get an empty array. In fact, I get an empty array on wrapper.find(img) as well. I am getting the wrapper, it just seems to have no images inside it. Are we querying the wrong element?

#1435September 17, 2018by benschiefer2 answers
0 reactions

[BUG] - Checkbox Traits are not rendered correctly

Checkbox type traits are not getting shown as "checked" in the component settings. To reproduce:Import markupSelect the input element in the canvasGo to Component SettingsNotice that the Checked setting is not checked. The same issue can be noticed for the "required" attribute. Similarly, if you import or or the compo...

artf

Should be fixed with the latest https://github.com/artf/grapesjs/releases/tag/v0.14.33 and https://github.com/artf/grapesjs-plugin-forms/releases/tag/v1.0.1 (changed the name of the plugin gjs-plugin-forms -> grapesjs-plugin-forms)

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.

#1431September 17, 2018by mrajeshkrossark3 answers
3 reactions

Load HTML file from remote

I hosted my html content in cloud. Then trying to load the html content in the editor I found the error: "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an...

cjpollard

You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage

JulyanoF

> You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storageI tried with below endpoints that also shows errorstorageManager: {typ...

mrajeshkrossark

You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage I tried with below endpoints that also shows error storageManager: { ty...

#1420September 12, 2018by sureshDurai1233 answers
0 reactions

Customizing Block(section block) While Dragging it

Hi I have seen that there was two separate blocks to add 'sections' and 'columns'.We have a flow like when we drag a section into canvas need to show a popup on that we manually able select the section to be one column section/two column section,how do we achieve this. And also we have seen the method editor.on('compo...

nojacko

If your sections always require 1 or 2 columns, why not remove the section and column blocks, instead, add new blocks for "section with 1 column" and "section with 2 columns" and save the popup?

sureshDurai123

Yeah it is possible only .But we have the requirement that we need to show single section to customer and based their pick in popup only we need to split it.

nojacko

Ok. In that case, it's the canvas:drop event. Hook into that, check it's a section and open your modal. I'm not sure on how you insert the columns but hope this helps.

#1418September 11, 2018by ageir3 answers
0 reactions

[BUG?] Asset manager not deleting files on server unless upload triggered.

Running latest version (0.14.29) on local server. Using the example webpage preset. Ubuntu 18.04, Chromium 68. Assetmanager init: And extend image type: The all_files variable is load from php, and it has the right data and format, all images stored on the server. The problem is that the onRemove is not triggering as...

artf

Hi Göranbut reappearing when reloading the page you're initializing the asset manager with assets: allfiles so if you don't change allfiles you always get the same set of imagesAlso when dragging an image to the canvas, the image is not sh...

ageir

@artf I don't think you understood me. They are reappearing because they didn't get deleted on the server. all_files are generated via php on page reload, and showing the correct files on the server. The problem is that onRemove isn't trig...

artf

Ah ok probably because your assets are already rendered. Try to apply those changes but inside a plugin

#1414September 10, 2018by gabrigcl3 answers
0 reactions

[QUESTION] Component "first render" event

Hi. I'm developing a plugin for charts using chart.js. I need to persist the model of the chart inside the generated component to render the chart on back canvas loads. In order to achieve this, I decided to persist the model of the chart in an HTML atribute of the component. This is the generated HTML of the componen...

artf

You can use onRender

gabrigcl

Thanks, this method works! However, I have to store the model of the chart inside the html of the component, in order to make possible that the generated template render the chart outside the grapesjs editor. I can't persist anything insid...

artf

@gabrigcl I don't understand which is the problem now... I can't persist anything inside a custom html attribute of the component, the way I want But it's exactly what you've showed in your previous post, try elaborate better what you need...

#1408September 6, 2018by Siddharth-ss422793 answers
1 reactions

Why Text element converted into box ??

Hi @artf , I am using grapesjs newsletter plugin with ckeditor plugin. I dragged TEXT element in canvas and did some editing with ckeditor. i have connected it to database. when ever i save content in database after reloding the editor i set content value from database field and after that TEXT element get converted i...

artf

@Siddharth-ss42279 If you need to EDIT the template created from GrapesJS, you SHOULD NOT USE ITS HTML.... you should import its JSON... so you're doing it WRONG It's like doing this and then complaining why your el doesn't have click list...

artf

What do you store in your database? The HTML and CSS?

Siddharth-ss42279

Hi @artf Actually, i get in-lined html using command editor.Commands.get('gjs-get-inline-html').run(editor) and saving it to database and for rendering content i am using editor.setComponent(content_field) problem is when i render content...

#1401September 4, 2018by robgar952 answers
0 reactions

help for create component

Hello, I need to do two things:I need a component to create a button with specifically id and disabled edit the id.Define one tag HTML impossible remove. (nor with the clear canvas function) Thanks for read me

artf

https://grapesjs.com/docs/modules/Components.html

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.

#1380August 24, 2018by bright-ic2 answers
0 reactions

How can i make elements absolutely positioned on canvas by default when dropped.

Grapejs is what i have been looking for over a long time now. Though by default, all elements are relatively positioned when dropped on the canvas and i don't want that. I want the elements [blocks or components] to be absolutely positioned and can be dragged to any part of the canvas. Your help would be saving me a g...

artf

Hi @bright-ic what you're asking is what we call the Designer mode, it's on our Roadmap but unfortunately not yet implemented :/

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.

#1368August 16, 2018by shlomoko3 answers
2 reactions

Resize canvas

Is there a way to have a dynamic resizing of the canvas? i.e not using the Device Manager, but having a drag and drop of the width, similar to what you can do with panels or components? Thanks

jvillena

@artf and @shlomoko, I will explain the step little by little. Firstly, I need to use Jquery but you can use other library or integrate inside the GrapesJS engine. In my case I wanted to do it transparent to the engine. 1) I have two hidde...

artf

No @shlomoko, canvas is not resizable but I'd be glad to see a PR for that (possibly with the same logic used in panels)

jvillena

Hi @artf, I've just implemented a resizing canvas bar but I don't know if exist a way to refresh the position of the highlight borders. Take a look in the video please: http://recordit.co/jKlppYg2dD gjs-badge gjs-toolbar Best regards.