GrapesJS Issues

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

3,464 issues found

#3221Jan 7, 2021by lebonsavane2 answers
0 reactions

Button into a textarea

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

#3219Jan 6, 2021by Abhisheknanda13444632 answers
0 reactions

Add Type for block and css with class name

Hi @artf I am stuck on one thing I want to add one block in which I want to add style with the class name also Here is my code -: This give me the exact thing what I wanted like HTML-code in the HTML section and style part in the style section but I want to add a new trait for the same and how can I define type in thi...

artf

and make yourself a favor, stop defining entire sections in blocks, use a component-oriented approach so your blocks will be mainly like this:

GJSBlock

Thanks for reporting this, @Abhisheknanda1344463. Thanks for sharing your report about Add Type for block and css with class name. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbo...

#3218Jan 5, 2021by bgrand-ch4 answers
2 reactions

How to add new HTML element with inline styles?

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 πŸŽ‰

bgrand-ch

https://github.com/artf/grapesjs/issues/3069 πŸ€”

#3216Jan 5, 2021by tomhatzer4 answers
2 reactions

Add referrerPolicy to image loading through asset manager

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

#3215Jan 4, 2021by san-1232 answers
0 reactions

Content loading issues from remote database

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

#3214Jan 1, 2021by Abhisheknanda13444632 answers
0 reactions

Ckeditor Enable for header type

Hi @artf I've added the CKEditor in the grapesjs and it's working fine but the problem is on the header-block CKEditor is not showing up I've tried to add the format tags but it didn't work. Could you please help me Thanks

artf

Please confirm/ensure it's related to GrapesJS and not CKEditor as it might be an expected behavior (might be also against HTML5 specs as I don't see a reason to have a content editable header...)

GJSBlock

Thanks for reporting this, @Abhisheknanda1344463. Thanks for sharing your report about Ckeditor Enable for header type. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle)...

#3213Dec 30, 2020by theSC0RP4 answers
5 reactions

How to save the dynamically added traits

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.

#3212Dec 30, 2020by Abhisheknanda13444632 answers
0 reactions

Lightbox Component

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

#3211Dec 29, 2020by alemenciones2 answers
3 reactions

How to move components

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

#3209Dec 24, 2020by TouficNouwayhedd2 answers
1 reactions

When in preview mode, the toolbar is only being hidden but still clickable

Version: 0.16.22 Are you able to reproduce the bug from the demo? Yes What is the expected behavior? When the use presses the preview button, the icon toolbar must no be clickable. Describe the bug detailed When the user presses preview (even in the demo website), if you hover over the selected component before pressi...

artf

Fix ready for the next release

GJSBlock

Thanks for reporting this, @TouficNouwayhedd. The issue with When in preview mode, the toolbar is only being hidden but still clickable appears to be a race condition or state management timing problem. This typically happens when componen...

Browse all topics