GrapesJS Issues

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

203 issues found

πŸ” enhancement
#3307Mar 3, 2021by neon123454 answers
3 reactions

Provide a not minified version

Is there a single file version of grapesjs that is not minified? It would be nice to have one for bug fixing and quick testing of new features/improvements.

neon12345

It is disappointing that this is just closed. Sure I could change my workflow but why not make it as comfortable as possible for people to contribute?

stljeff1

Would somebody kindly explain how to use the sourcemap? I am having a very difficult time upgrading to the latest grapes version, and need any debugging help I can get. I am importing grapesjs into my Angular/Typescript app. I don't unders...

Ju99ernaut

That's already available, just reference grapesjs.js instead of grapesjs.min.js

#3292Feb 26, 2021by sudiptochoudhury3 answers
1 reactions

Is there a event per component before save which the component can listen to?

Much grateful to you for this library. Background: I am building an editor where I intend to define most of the components from an existing set of Vuejs components which I have developed earlier and use in my applications. Most of these are UI based simple and complex components. For example, I have simple vuejs compo...

Ju99ernaut

I'm not sure if such hooks exist per component but you can try to take advantage to the toHtml property of a component. It's already been discussed elsewhere so you search it in the issues as there are quite a few.

artf

Yeap, you can define your components with a custom toHTML/toJSON function (in model), in order to customize their output

GJSBlock

Thanks for reporting this, @sudiptochoudhury. The issue with Is there a event per component before save which the component can listen to? appears to be a race condition or state management timing problem. This typically happens when compo...

#3280Feb 19, 2021by bgrand-ch1 answer
0 reactions

Renderless

What are you trying to add to GrapesJS? I try to styling GrapesJS and positioning its elements (panels, buttons, canvas, etc.), it's annoying to override all style elements. Describe your feature request A renderless GrapesJS.Append a specific GrapesJS element (panels, buttons, canvas, etc.) into any container in the...

GJSBlock

Thanks for reporting this, @bgrand-ch. Great suggestion about FEAT: Renderless! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative approaches: List...

#3277Feb 18, 2021by FrancoFasano2 answers
1 reactions

Default PDF size: US letter How to set A4?

WARNING READ and FOLLOW next 3 steps, then REMOVE them before posting the issueJSFiddle Starter template https://jsfiddle.net/szLp8h4nCodeSandbox Starter template https://codesandbox.io/s/1r0w2pk1vl *Version:0.16.3 You can get the version by typing grapesjs.version into the console Are you able to reproduce the bug fr...

artf

Hi Franco, you can define the frame size by changing devices

GJSBlock

Thanks for reporting this, @FrancoFasano. The issue with Default PDF size: US letter How to set A4? appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modificat...

#3269Feb 12, 2021by acondura4 answers
0 reactions

Translating html string

Great library! It meets all the requirements but one: website text translation. I've searched high and low through the issue queue and docs and for some reason I can't find anything about this subject. My clients do not care that the grapesjs editor is in English. What they want is the ability to easily translate thei...

artf

This is something you would need to create on your own. Maybe a custom text component, which gives the possibility to change the content with the selected language.

jordandevogelaere

@acondura do you have a solution for this? I have the same requirement for my client. Thanks

gxanshu

i have the same requirement too. and yes only way we can achive this is by creating our own component

#3268Feb 12, 2021by theSC0RP4 answers
0 reactions

How to add javascript in the html without sanitization?

Hey @artf, I am taking javascript input from the user. I need to add this javascript inside the template HTML but it gets sanitized. Is there a way that I can turn off the sanitization? (I don't have an issue with the problems you mentioned in #3245 ) or can you add a property in the editor like allowSanitization: fal...

theSC0RP

I tried adding the script to the iframe in which the canvas renders by adding a <script> tag at the end of the body of the iframe. This works to some extent. The problem here is that when I need to update the js inside the script I will ne...

artf

Can you provide a reproducible demo of your issue, please?

theSC0RP

Thanks for the reply @artf. I was doing a mistake while updating the iframe so now my problem is solved! Just another question, is there any built-in method to refresh the iframe?

#3267Feb 11, 2021by mosh-tudor4 answers
1 reactions

Cannot set 0px box shadow blur

For some reason, the editor does not allow to set the blur to 0px. 0 always magically turns into 5px. <img width="243" alt="Screenshot 2021-02-11 at 17 14 05" src="https://user-images.githubusercontent.com/668451/107664461-ba321e00-6c8c-11eb-91ce-4e8a87a2e33c.png"> Are you able to reproduce the bug from the demo? Yes...

artf

This one should already be fixed

artf

Thanks, I guess there is some falsy check with the 0 which leads to the default 5px value.

akankshach29

Would like to help fix this bug. Will raise a PR.

#3245Jan 21, 2021by bgrand-ch3 answers
0 reactions

Grapesjs-custom-code doesn't execute <script> from GrapesJS 0.16.30 and up

grapesjs-custom-code work fine with script tag until GrapesJS 0.16.27, after this version, no script content is executed. βœ”οΈ Editor init() option : allowScripts: 1 βœ”οΈ Plugin import : https://github.com/artf/grapesjs-custom-code/issues/11#issuecomment-724512902 Is it related to https://github.com/artf/grapesjs/issues/3...

nithinpillalamarri123

hi very thanks for u r replay... yes exactly , after you are replay i tried with 0.16.27 custom blocks script is working as expected but in above versions than 0.16.27 while drag and drop custom block script executing as expected but after...

artf

Hi @bgrand-ch probably you're talking about a fixed bug πŸ˜‚ Main reasons why you should not let execute a random script from a user:Self-XSSWe can't control the script if we execute it inside the editor, so, for instance, the user paste thi...

GJSBlock

Thanks for reporting this, @bgrand-ch. Great suggestion about grapesjs-custom-code doesn't execute <script> from GrapesJS 0.16.30 and up! While this specific feature isn't yet in the core API, there are several ways to achieve similar beha...

#3231Jan 13, 2021by vatte214 answers
2 reactions

How to change gjs-ckeditor-format component

hi guys, we all know that gjs-ckeditor-plugin working with [data-gjs-type]="text" components. I wanna know , could we change this option? I want to make my own custom component with for example [data-gjs-type]="anyDiv" and have the same functionality like in [data-gjs-type]="text". maybe someone knows how to change th...

Abhisheknanda1344463

@vatte21 To make your component editable.You've to extend the text type in your component like this way

vatte21

@Abhisheknanda1344463 Thank you! Ill try

abulka

@Abhisheknanda1344463 your code fragment gives me an error Uncaught ReferenceError: type is not defined on the line where is type defined?

#3223Jan 7, 2021by ianef3 answers
2 reactions

Create the canvas from a URL

I've been playing with GrapesJS and trying to integrate it into a Symfony 5 project. In particular I want to be able to edit templates in the editor based on Bootstrap 4 and other components like FontAwesome Pro and custom blocks based on these. I use Symfony's Webpack-Encore bundle to generate the scripts and style f...

ianef

That's a real shame. I didn't say anything about fetching from another site, what I wanted to do was keep it consistent with the rest of the project. Oh well, I'll keep looking elsewhere for an editor that integrates better with the curren...

artf

Hi Ian, if you need to load HTML content from a URL I can only suggest fetching it server-side and initialize the editor with that content (loading external resources in the browser would mostly hit the cross-origin issue), so, for how bro...

GJSBlock

Thanks for reporting this, @ianef. Great suggestion about FEAT: Create the canvas from a URL! While this specific feature isn't yet in the core API, there are several ways to achieve similar behavior. Using the event system: Alternative ap...

Browse all topics