GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#3056September 30, 2020by micker3 answers
2 reactions

FEAT: option for responsive design

hello i am not sure its not already implement but i didn't find where => with grap we can change display for check responsive option but we can't change option for specific device ? like change size of block on smartphone exemple what do you think about this ?

MartinPutz

@micker If I'm understanding you correctly, then this is already implemented, when you change the styles of a component on a given device, a media query will be used. You can see that on the demo page: https://grapesjs.com/demo.html You ca...

micker

Ah cool

theSC0RP

@MartinPutz I have implemented the responsive feature as shown in the getting started guide but when I click on the mobile icon, the layout is only squished. (The two-column layout does not change to two-row. Only the width is reduced) Can...

#3055September 30, 2020by ghost1 answer
0 reactions

FEAT: collapse all categories by default

how to collapse all categories by default? I tried the methods described in #446 and #316 they don't work anymore.

artf

This one works as expected editor.BlockManager.getCategories().forEach(c => c.set('open', false))

#3053September 30, 2020by anushabivera3 answers
5 reactions

Allowing user to add a global stylesheet to canvas dynamically

Hi, I wanted to provide the user the option to load a custom stylesheet to the canvas. This is so that the user can apply the custom defined styles to the control as class instead of inline style and also to maintain uniformity among the various users using the grapesjs based editor tool to generate the html template....

RJCAM

Hi @anushabivera if you want to load the stylesheets on init (local and with cdn) you can simply add the css/js links to the canvas property on editor init function, like this: If you want to add them dynamically you can try this (example...

theSC0RP

I got it! I removed it by using an id on the link tag.

anushabivera

Thank you @RJCAM . My plan is to provide the functionality as an attribute of the canvas and the user can enter the url of the custom stylesheet as value of the attribute

#3052September 30, 2020by MudassarSandhu2 answers
0 reactions

BUG: hide/show traits and change their values dynamically

I have extended the link component and add new traits like href. In order to show or hide the trait i followed this #https://github.com/artf/grapesjs/issues/1460. But how to show those hide traits again on the basis of another trait change value? Right now what i have done is But its not reflecting the changes in the...

artf

You've called the trait name: 'select-type', but you're listening to change:selectType, so fix it by changing the listener in change:select-typeDon't rely on the trait value this.getTrait('select-type').props().value but on the component i...

chaegumi

getTrait('ID').view is undefined.

#3051September 29, 2020by ashercoren1 answer
0 reactions

BUG: build tests are failing

Version: dev branch (pre-release) What is the expected behavior? When running npm test or npm run build, the tests should complete successfully. What is the current behavior? I tried to build a production version of the repo, but npm test fails on multiple errors. I traced back the commits and the commit the broke the...

artf

Thanks @ashercoren I've seen it and fixed it locally but not yet updated the remote branch as I've noticed there is another issue to fix on Travis. I'll update it soon btw

#3050September 29, 2020by Abhisheknanda13444632 answers
1 reactions

Map Not Loaded full-width

Hi @artf , When i drop a "Map" on the canvas and hit the preview in new tab which is my custom preview. In that new tab of preview "Map" will not loaded with full width. Could you please help me on that.

MartinPutz

@Abhisheknanda1344463 I checked on the demo editor and it seems to work fine. Could you create a jsfiddle with your problem?

artf

I guess it might be something wrong with your preview, provide a live example at least, for now, I'll close the issue

#3049September 28, 2020by lebonsavane2 answers
2 reactions

Automatic PageBreak

Hello, How can i implement automatic pageBreak on GrapeJs. I want a pageBreak every 500px for example. how can i do that ? Sincerly Thanks for your answer @artf

MartinPutz

@lebonsavane As far as I know there isn't a feature to do that currently. I would create a custom component called 'Page', set 'removable' to false and this component would be added after the editor is loaded. So there would always be at l...

artf

Probably this thing might help with the logic http://marcj.github.io/css-element-queries/ (by attaching the ResizeSensor on the wrapper)

#3048September 25, 2020by ealipio2 answers
0 reactions

[BUG]: TypeError: Cannot read property 'get' of undefined

Version: 0.16.22Are you able to reproduce the bug from the demo? [x] Yes [ ] NoWhat is the expected behavior? no errors in the console.Describe the bug detailed File involved is: https://github.com/artf/grapesjs/blob/6296bf8c970f700aa69e44728b7db80833452f69/src/dom_components/view/ComponentTextView.js#L61

artf

Weird (the view component can't exist without the model), are you able to provide exact steps to reproduce the issue?

no-response[bot]

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...

#3047September 24, 2020by BCleverly3 answers
4 reactions

BUG: Unable to remove Strike via selection toolbar

Current version: 0.16.22 Are you able to reproduce the bug from the demo? [x] Yes [ ] No What is the expected behavior? Be able to apply and remove the Strike-through styling via the mini toolbar on a selection and remove it via the same process What is the current behavior? You're able top apply the styling via the m...

Ju99ernaut

This is as a result of this change #2886, as a temporary fix you can use: This adds a button that removes all formatting tags.

artf

Will be fixed in the next release

BCleverly

Thanks @Ju99ernaut - appreciate the help :)

#3046September 24, 2020by jesusdp2 answers
1 reactions

QUESTION: How to keep default sections in the canvas without the possibility to be removed by the user?

I want to generate a PDF Tool to have three main sections: HEADER, BODY and FOOTER. The three sections needs to be there always and I want to disable the possibility to allow the users to delete those sections. The rest of the components like images, text, columns, etc. needs to be editable like remove them if the use...

MartinPutz

By default all components are removable, so that's already covered. In terms of not allowing certain components to be removed, you can take a look at the component api:https://grapesjs.com/docs/api/component.html#component You would need t...

jesusdp

By default all components are removable, so that's already covered. In terms of not allowing certain components to be removed, you can take a look at the component api:https://grapesjs.com/docs/api/component.html#componentYou would need to...