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