How could I control the properties to be show in one row or two, like the demos? When I download the project grapesjs-preset-newsletter to local, also shows padding and margin in two rows which is puzzling. In fact,I would like to put them flexible with customized rows and columns. Or at least, 4 properties can be con...
artf
Just use the CSS
GJSBlock
Thanks for reporting this, @chenjingling90. Great question about FEAT: how to make 4 properties in one row,like padding,margin. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documenta...
Hi @artf I am trying to update the style using the checkbox trait but it's not calling the function. Here is the code I really appreciate any insight that you can provide! Thanks
Abhisheknanda1344463
@artf Got it silly-Mistake move the init function in the model itself. Closing the issue
GJSBlock
Thanks for reporting this, @Abhisheknanda1344463. Great question about How to Update Style from checkbox Trait?. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for yo...
I manually add a new node into a rendered component. The visual result is OK, but impossible to save, because my style isn't with the auto-generated GrapesJS ID. To manually resolve this poblem, I double-click on the component to enter to it and I click outside in the canvas body. Then, the GrapesJS ID and data-gjs-ty...
bgrand-ch
Optimized TextEditor.vue file: But the problem persist:✔️ span node replaces the previous content of selection, with font-family and color styles.❌ span node isn't recognized by GrapesJS, because there isn't GrapesJS auto-generated styles...
bgrand-ch
ℹ️ Don't works directly with HTML, works only with JSON. Component = JSON node (html element + GrapesJS data) Sources:https://grapesjs.com/docs/modules/Components.htmlhttps://grapesjs.com/docs/api/component.html
GJSBlock
Thanks for reporting this, @bgrand-ch. Great question about How to refresh/re-render after new node added?. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for your spe...
Hello everyone, I need to put a button into a textarea how can i do ? Is a property to modify or something else ? And is it possible in fact to do it ? Thanks for your answer @artf
artf
No, you can't, the textarea contains only text
GJSBlock
Thanks for reporting this, @lebonsavane. Great question about Button into a textarea. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the...
I would like to add a new HTML element, with inline styles, around the rte.selection(). With the following example, the HTML is OK, but probably not the JSON part:
artf
@bgrand-ch what do you mean by "probably"? 😅
bgrand-ch
@artf thanks for your quick response 🙂 update dependencies to 0.16.30 resolves my problem 🎉
What are you trying to add to GrapesJS? I'm trying to add the Referer header to image loading through asset manager. Describe your feature request detailed I'm working on a pagebuilder that's hosted on AWS. To stop people hotlinking my images, I've implemented AWS WAF which restricts image loading to the referer domai...
artf
As already replied to the PR, this can be done by extending the image component if necessary, without the risk of breaking the integration for others. And as a note, when you want to add a feature, you should always think about how this wi...
tomhatzer
Thank you very much for the tipp @artf - I'll try to get this done by extending the original component. Have a great day! 😃
tomhatzer
For everyone who has the same problem that the iframe doesn't send referrer headers for content displayed inside of it, here's a quick and dirty fix. Just set the Canvas iFrame src to your desired domain that you want to use the referrer w...
Hi, I created Grapejs Pagebuilder. I have two links one for pagebuilder1 and another for PAgeBuilder2. Both are redirected to grpaejs editor and loading content from database based on id. When I clicking by PageBuilder1 goes to index.html?id=1 (load saved content from database) When I clicking by PageBuilder2 goes to...
artf
Follow this guide https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage
GJSBlock
Thanks for reporting this, @san-123. Great suggestion about Content loading issues from remote database! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alt...
Hi, @artf, I have a custom component that has a button trait. When the button is pressed, I am adding a custom trait dynamically using comp.addTrait(). When I load the saved template, I want the container to show the dynamically added traits too. (I am loading the template using components but the dynamically added tr...
artf
I made it work by having a count attribute on the component and then adding the trait count times in the init of the container. This is the correct way. Traits are intentionally skipped from the JSON, otherwise, you'd put on hold your comp...
theSC0RP
@artf, thanks for replying. That was a really valuable piece of information.
theSC0RP
I made it work by having a count attribute on the component and then adding the trait count times in the init of the container.
Hi @artf I am trying to make a component lightbox as the same as the grape drop. I am not able to update the src of the image Could you please help me with that This is the code that I've written so far Lightbox block Component- :
artf
Check the image component
GJSBlock
Thanks for reporting this, @Abhisheknanda1344463. Great question about Lightbox Component. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Loo...
Hello dear: I want move a component to first/end in the wrapper programmatically, i think something like editor.getWrapper().add(editor.selectedComponent(), {at: 0});, but this's adding a new clone from selectedComponent, maybe with trigger "sorter:drag:end" at position?? can you help me? sorry for my poor english :')
artf
Probably it makes sense to add a new component.move(desComponent, opts) method to cover such a case, but for now you can achieve it in this way:
GJSBlock
Thanks for reporting this, @alemenciones. Great question about how to move components. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for...