GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#2076June 12, 2019by msassa3 answers
2 reactions

[QUESTION] How make a new component to allow laravel blade directives?

Hi, thanks for the nice work. I'll like to know if there is a way to use blade directives inside the code. I already add a new functionality to edit the source code, and work just fine. But when I write something like that, the canvas show a ugly text: And I like to find a way that @if don't render in the canvas. Do y...

artf

@msassa If you write the code like this, it's quite hard for the editor to understand it, but if you create a kind of custom conditional component you'll get more control over it. Here an example of your case where the condition can also b...

verdverm

What would parse that syntax during rendering? I've been looking at running react in the canvas, but we need to load react and transpile components we create. There is an in browser babel script to do something like this. Haven't got it fu...

msassa

Hi, I'm saving that code into a file, in S3. Later, I use that files in a Laravel application. Everything work fine, the only improvement I like to do, is: The code is correct as source code, and it has to be saved that way. But when I vis...

#2075June 12, 2019by webdeveloper04293 answers
1 reactions

[bug] style manager slider min value bug

when I set slider to 0 (min value) the slider return -1 value and this style property is ingored completely since it is not valid css. for example I found the code why this happens only min value. in the style manager slider view code when slider value not min value, this works well. but if value is set to minimum(for...

arthuralmeidap

@starcraft0429, could you provide us a code example? I have tried to simulate it but without success.

storyofyours

@artf Be our hero ;)

artf

Guys, it's really important to follow the ISSUE template, I don't even know which version do you use! Can you create a reproducible demo because I don't understand how to reproduce it

#2074June 11, 2019by VM81983 answers
0 reactions

Can not use space while editing drop down menu in block manager

hello @artf I have applied a drop down menu in block manager the code is given below It works fine but whenever I try to change the dropdown lists it doesn't applies space. It takes all letters but space is ignored by the editor please help

verdverm

Try looking at the DOM to see what your drop-down item in the canvas to see what html elements are created. Does that output look like the html you expect?

VM8198

@verdverm yes in DOM the output looks exactly same as I needed see this video...https://drive.google.com/file/d/1bgb6QibnPPU6qGbLDudOD9xeMGtmvsnG/view

artf

Not able to reproduce with your code, create a reproducible demo, please. BTW properties like removable, draggable, droppable are part of the component definition, not blocks...

#2073June 10, 2019by AlejandroSuarezA3 answers
0 reactions

[QUESTIONS] Trouble using urlLoad

I've got an issue calling to my endpoint to load a template, it's doing a pre flight OPTIONS request but I cant find how to continue after the OK response componentDidMount() { this.editor = GrapesJS.init({ container: '#grapeEditor', plugins: [gjsPresetNewsletter], storageManager: { id: 'gjs-', type: 'remote', urlLoad...

verdverm

Is there more to you server? Does next() actually reach a handler? Can you get the expected template from outside of 🍇 (with curl or postman)?

artf

Try to check errors in console, probably you miss something in your CORS configuration. Try to start only with res.header('Access-Control-Allow-Origin', '*'); BTW I close this as it's not related to grapesjs itself

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.

#2072June 10, 2019by fmr4111 answer
0 reactions

[QUESTIONS] show rte editor

I want to ask, why when I want to display the rte editor with "editor.getSelected (). view.enableEditing ()" but there is an error "editor.getSelected (...). view.enable Edit is not a function", Thanks

artf

Actually, enableEditing method was removed and replaced with onActive, but to avoid any future change I'd recommend using this editor.getSelected().trigger('active')

#2070June 7, 2019by adamwpe3 answers
0 reactions

[QUESTIONS] Stop the style manager from replacing AUTO with the pixel units

Not too sure how to explain it, but it appears that the style manager replaces 'AUTO' with the actual units. But if the user changes a value, e.g. margin-top. It saves the units, not the 'AUTO' value within the other fields that were not amended. Meaning the behavior of the div is unexpectedly different. e.g. no longe...

adamwpe

One of my settings was incorrect during testing.

danielwirz

Hi @adamwpe I have the exact same issue. What setting did you change to solve this? Thanks & best regards

AnnaSu

@adamwpe I have the same issue. How did you solve it?

#2069June 6, 2019by Sparragus3 answers
0 reactions

[BUG] `allowScripts: true` still deletes <script> tags

Hi all. Thanks for creating and maintaining this amazing project. 🙏 Bug Description I have a block that inserts a script as specified here: https://grapesjs.com/docs/modules/Components-js.html#basic-scripts When I drag the block to the canvas, the component will indeed have the script attached to itself. However, whe...

dosponsor

Can you please provide the solution for this issue.

artf

Thanks for the report @Sparragus The problem here is when you use a function for the script inside Blocks. When the editor tries to store the JSON the structure is serialized but the function is not serializable so for that component an em...

Sparragus

@artf Thank you for the clarification. Cheers.

#2068June 6, 2019by ssabrewolf3 answers
0 reactions

GrapesJs gradient plugin not working anymore

Hello GrapesJs team After updating the grapesjs version form 14.0.59 i noticed the gradient plugin stopped to work, i also checked the gradient demo page and i noticed the same behavior here https://codepen.io/artf/pen/bYwdQG Thanks in advance

ssabrewolf

hi @artf i noticed you added the help wanted tag, i could try but could you give some tips or hypothesis about what could be the reason to not start from zero wondering in the dark, of course im asking because you seem to be the author of...

artf

@ssabrewolf yeah I'm the author of the gradient plugin but to be honest I've no idea what is happened, definitely a regression after some update in the Style Manager module. What I can say, is working fine with the v0.14.50

alikabeer32

It's absurd but I find that if you type 'decoration' instead of Decoration, the plugin works! In the demo and in my code as well.

#2067June 6, 2019by megarg3 answers
0 reactions

[QUESTIONS] cannot reference another library from a custom component

Hi Artf, I have been trying to do this for the whole day and it is not working. I could not find any example or no solution came up in my search. Here is relevant portion of my code in the "components.js" of custom plugin: I am getting a compilation error that "Formio" is not defined no-undef. Note that the script I a...

megarg

$ node -v v10.15.3 $ npx node-sass -v node-sass 4.12.0 (Wrapper) [JavaScript] libsass 3.5.4 (Sass Compiler) [C/C++] OS is: Windows 10

artf

You can't use Formio if it's not yet defined, I guess you use the code below to load it but as loading a script is an asynchrones operation you have to wait it, so the script.onload part you've commenetd in necesssary...

megarg

Hi Artf Thanks for your response. The basic problem is that "script.onload" event does not fire on Chrome. I also tried "eventListener" but that also does not fire on chrome for script. It fires for "window" but does not fire for "script"....

#2066June 5, 2019by tsuwunrut-carecloud3 answers
2 reactions

[QUESTION] Page Limit

I'm currently using GrapesJS as a Letter/Form Composer, and it's been working wonderfully so far. However I'm just finishing up the last few requirementsI'm scaling the canvas to the size of an A4 piece of paper so that when it prints, everything is consistent with the form they've built. However, I'm unsure whether o...

bloigge

@tsuwunrut-carecloud - did you find a solution for your problem? I am facing something similar.

bharatnadkarni

@tsuwunrut-carecloud @bloigge @sagarneo11 did any of you find a solution to this?

sagarneo11

@tsuwunrut-carecloud, Can you please let us know if you find solution on above mentioned function?, would love to have same function in my app it would be really helpful if you could suggest.