GrapesJS Issues

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

3464 issues found

#1399September 3, 2018by aj00223 answers
0 reactions

Change the trait view

Hi Artf, Thanks for your great work i really wonder for your work. I have small doubt in trait management i would like to open modal instead of gear icon in editor. When user select input it is hard to change the input names because of it is not getting halite user does not recognise that gear icon instead of gear ico...

artf

I think for your case you would need to extend the input components and open the modal (eg. on double-click) where you can help the user setting its traits

aj0022

Thanks for your reply, But I don't know how to do that could you please help artf.

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.

#1398September 2, 2018by huzineczerik3 answers
0 reactions

GrapesJS translate

Hello @artf , Do I want to translate all functions into Hungarian, so that I can do it? Please give me examples of how to modify these texts:I checked the issues #26 but I dont understand how to translate all texts. Thank You, Erik

artf

Hi @huzineczerik if you check the Getting Started guide you will see that all the texts are defined by the configuration object. If your goal is to extend an existing preset in that case you have to access each element of the module via it...

huzineczerik

Thank You @artf , I tried but did not work What do I do wrong? UPDATE It only works if I write this after init. If I call from the console, it will not work

huzineczerik

so I tried does not work

#1396September 1, 2018by jmrgz2 answers
0 reactions

[Bug] Background image layers

Bug: when your pre-defined block or saved templates have two or more background layers, if you add a new layer, a lot of new empty layers are created. How to reproduce it:Go to https://grapesjs.com/demo.htmlSelect the pink Header blockGo to Decorations -> background and add a new layerDeselect the pink Header and sele...

artf

Thanks @xamdam777 for the report. Actually, as you already indicated, this happens when you import the style (and browser's CSS parsers are pretty messy), and unfortunately, in few cases, conflicts happen. (eg. Chrome generates a style tha...

jmrgz

Thank you very much @artf, now I completely understand the problem, damned browser's parsers! :) I have been doing some tests in addLayer() and refreshLayers(). This is my current approach, modifying refreshLayers() function, I try to dete...

#1395August 31, 2018by kuldeepcis2 answers
0 reactions

Update component for images

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.

#1394August 30, 2018by nojacko2 answers
1 reactions

[Bug]: Pasting multiple paragraphs aren't editable until Grapes reloads

https://grapesjs.com/demo.htmlIn the double click into the text "All text blocks could..." to trigger editing mode.Paste this text in: The text is not editable until Grapes is reloaded

artf

Thanks @nojacko found the issue, will be fixed in the next release

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.

#1393August 29, 2018by pnellesen3 answers
1 reactions

[Question] Add grapesjs color picker to a new trait type?

I'm building a a new trait type, and would like to be able to include the grapesjs color picker inside it - any suggestions on how to do that? Right now I'm including the standard HTML color input in my "inputEl" html (along with a text field and radio button) but I would love to be able to use the one that comes with...

pnellesen

@nojacko I've modified my code a little, here's basically what I'm doing: Hope this helps. This is still a work in progress :) Note that the getInputEl method of the colorPicker appends a spectrum colorpicker to the body of the canvas each...

artf

Hi @pnellesen this is actually a really good question, definitely, we should allow doing so but unfortunately, right now it's not so straightforward. We should refactor few modules to make the UI more reusable. BTW try to extend editor.Tra...

pnellesen

@artf - thanks for the response! Your suggestion worked pretty well (and it even works in Internet Explorer, which is better than my html5 color picker :p ). I have some tweaks to do to my styling and my input data, but otherwise it's good...

#1391August 29, 2018by FrciSmrci3 answers
0 reactions

[BUG] Property slider view default unit

Hey @artf , thanks for the enhancement! The implementation works as expected with some properties (font-size, border-radius, ...), but not with others (line-height, border-width, ...). I created a example/demo where it's visible that the configuration is the same in both scenarios, however the unit doesn't apply in th...

artf

I created a example/demo where it's visible that the configuration is the same in both scenarios Actually, you didn't indicate the defaults, where in case of line-height takes normal by default and so resets its unit on initialization

FrciSmrci

@artf I think that this specific fix messed up the properties without units, like Opacity. The slider behaves weirdly in this case, even on the demo.

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.

#1390August 28, 2018by lorrandavid1 answer
0 reactions

Prevent Asset Manager from closing before selecting image

I want to keep the Asset Manager as long as possible if the user didn't select an image, how can I prevent the event bubbling from happening when I press the close button on this specific modal? Also, is there a way to change the click event when selecting an asset?

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.

#1389August 28, 2018by mariselvanm2 answers
0 reactions

Add Attribute to Child Elements in component

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.

#1388August 27, 2018by froderf3 answers
3 reactions

Update the style of selected component

I'm trying to update the css of selected element. Example: Selected element: <div id="inul" class='class1'>Hello</div> the above code was returned from component.toHTML(); CSS: .class1{ background-color: black; } the above css code was returned from editor.CodeManager.getCode(component, 'css', {cssc: editor.CssCompose...

artf

Ok, if you select an element like this: <div id="inul" class='class1'>Hello</div> You have these options:Use editor.getSelected().setStyle({ color: 'red' }) to change only the selected component style, so in result you will get:Change the...

artf

@froderf when you do .setStyle(content ); content should be an object like { color: 'red' } and not a string with also the selector

froderf

what I need here is something like editor.CodeManager.setCode(component, 'css', {cssc: editor.CssComposer}); which update the style of selected component