GrapesJS Issues

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

644 issues found

๐Ÿ” components
#1424September 14, 2018by mararn16183 answers
0 reactions

Checkbox trait value is rendered differently in view (render()) vs model (getHtml())

I have a custom component with a checkbox trait 'show-name'. When the trait value is 'true', the component renders in the view to the attribute show-name="true", whereas the model only has "show-name" and renders to "show-name" via getHtml(). How can I get a checkbox-trait to render to "show-name=true" via getHtml()?...

artf

@mararn1618 can you create a reproducible live demo of this issue, please?

mararn1618

Hi @artf, of course. I have extracted the relevant parts of my project and created a demo along with reproduction steps:Demo: https://www.secretbakery.io/grapesjs/issue1424.htmlList demo files: https://www.secretbakery.io/grapesjs/ Thanks...

mararn1618

I am right now using a workaround for this, so that my AngularJS directive - where this attribute shall be used - recalculates 'show-name' as if we had 'show-name="true"' in the link stage.Workaround AngularJS Directive

#1400September 3, 2018by FlashPapa2 answers
0 reactions

[BUG] double dash in texte

With /! grapesjs - 0.9.15 / When we edit a text box and we put a double dash and we use the function 'mjml2htm' we have the following error : Error: [MJMLError] ParseError: Error while parsing the file grapesjs-mjml.min.js:2:30405 a http://127.0.0.1/earcGrapesJs/app/bowercomponents/grapesjs-mjml/dist/grapesjs-mjml.min...

artf

@FlashPapa your grapesjs version is outdated and this is the core repository, which has nothing to do with mjml plugin

jmchaves

Double dash is still happening:

#1395August 31, 2018by kuldeepcis2 answers
0 reactions

Update component for images

I've saved template in the database with all the components like images and all. But after that I've upload new images in the system so those will available in template but when I try to update old template image than it'll display only previous images not new one. Please let me know how can I update image component....

artf

Without any reproducible demo seems more like an issue on your side (db/server). I'll reopen this in case you're able to show the issue

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.

#1389August 28, 2018by mariselvanm2 answers
0 reactions

Add Attribute to Child Elements in component

This is the component I try to add in Editor. <div class="page"> <div class="col1"></div> <div class="col2"></div> </div> After adding those components I try to add some computed values to the elements like this, element.on('component:add',function(ele){ ele.addAttributes({ 'data-top' : topOffset, 'data-left' : leftOf...

artf

Check here all the methods available for components: https://grapesjs.com/docs/api/component.html Btw you would something like this

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.

#1386August 27, 2018by mariselvanm2 answers
1 reactions

Is there any "Resize event" for components?

I want to read the resize event when an element is triggered for resizing. My current Code looks like this, editor.on("component:resize", function(model) { console.log('model',model); }); But, It is not working . Is there any option to do this?

arthuralmeidap

Since the resize is just changing the value for width and/or height I haven't tried but I think you could try with the event styleManager:change:{propertyName} Take a look here for available events: https://grapesjs.com/docs/api/editor.htm...

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.

#1374August 22, 2018by emilsedgh3 answers
1 reactions

Default Component Properties

Is there any way I can change the default properties of components? I want almost everything to be copyable: false, resizable: false, draggable: false unless the loaded component specifically provides a data-resizable=true. So basically I want to whitelist some components to enable these instead of blacklisting. Is it...

jereddanielson

@artf FYI that doesn't exactly work as needed. Updating the default component's default properties does not take effect for already-defined components (such as built in table, textnode, et. al.) because they have already extended the defau...

artf

You can update the default component https://grapesjs.com/docs/modules/Components.html#update-component-type

artf

@jereddanielson correct, this is how you should do to update also already defined component types. Thanks for pointing this out

#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.

#1363August 14, 2018by jvillena2 answers
0 reactions

Problem trying to inject new HTML content in the Editor

Hi @artf, I'm now working on doing content in multi-languages inside the editor but I would like to know how can I save in the Dom HTML new HTML elements closest to the element selected (or update the these elements as new components inside the editor). For instance, I'm including some hidden div inside the HTML but w...

jvillena

I've just fixed my problem doing a workaround after researching on the grapesjs core. I'm going to explain the solution that I did: 1) I'm using a popup dialog with a bootstrap switcher to select text language. The complicate issue is how...

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.

#1349August 7, 2018by Sheetalordant2 answers
1 reactions

Update style manager properties depends on components

Hi @artf Thank you for great library. I want to update style manager properties on the basis of components type. For example, If there is text components on canvas then there should be only text related properties like font, font-family and no width and height. Is that possible?

artf

Yes, please check #1131

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.