GrapesJS Issues

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

1,399 issues found

πŸ” outdated
#1393Aug 29, 2018by pnellesen3 answers
1 reactions

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

#1391Aug 29, 2018by FrciSmrci3 answers
0 reactions

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.

#1390Aug 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.

#1389Aug 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.

#1387Aug 27, 2018by YashPrince2 answers
0 reactions

Include all the google fonts?

@artf I want to include all the google fonts in font family. How can we include/import all the font family, Any help would be appreciated.

artf

You can init the editor with custom style/scripts if you need or you can add them dynamicly 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.

#1386Aug 27, 2018by mariselvanm2 answers
1 reactions

Is there any "Resize event" for components?

I want to read the resize event when an element is triggered for resizing. My current Code looks like this, editor.on("component:resize", function(model) { console.log('model',model); }); But, It is not working . Is there any option to do this?

arthuralmeidap

Since the resize is just changing the value for width and/or height I haven't tried but I think you could try with the event styleManager:change:{propertyName} Take a look here for available events: https://grapesjs.com/docs/api/editor.htm...

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.

#1385Aug 27, 2018by ionic6663 answers
0 reactions

About the use of setAttributes

hi,I saved an object in the custom property。 And I want to implement putting values into custom properties。 but It will cover the previous one

arthuralmeidap

so, in the second case do you want to update the same data-info attribute with a new key, right? since data-info has a string as a type value, first you need to get it and parse to an object. const dataInfoObject = JSON.parse(this.model.ge...

artf

I thinks he's just looking for addAttributes

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.

#1384Aug 27, 2018by ahmadcore2 answers
1 reactions

Newsletter preset button only view text

hiii, i use latest grapesjs with newsletter preset plugins, but when i drag & drop button control only view text this my code: <script type="text/javascript"> var images = []; var editor = grapesjs.init({ clearOnRender: true, storageManager: { id: 'gjs-nl-', }, assetManager: { assets: images, upload: 0, uploadText: 'N...

artf

Styles of those blocks are defined here, you can copy them or define your own

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.

#1383Aug 27, 2018by Abhisheknanda13444633 answers
0 reactions

Can we change the icon of style manger?

hi @arthuralmeidap i want to override font awesome icons of panel "views" say style manager i want to replace icon with my "svg" icon .Can you please help to sort-out the things this is how i tried but it'll not reflect any changes. Thanks

arthuralmeidap

any luck?

Abhisheknanda1344463

???? @arthuralmeidap i tried to do that many times but still failed.Can you please help me out?

artf

https://github.com/artf/grapesjs/issues/1379#issuecomment-417939769

#1381Aug 24, 2018by YashPrince2 answers
0 reactions

Custom Embed Video in Video Component

@artf I want to include a custom embed code in Video component so that user can add any iframe containing video. Any help would be appreciated. eg:- <iframe width="640" height="360" src="//player.vimeo.com/video/123456789?autoplay=0&title=0&byline=0&wmode=transparent" frameborder="0" allowfullscreen="" wmode="opaque">...

artf

You can update the video component by adding a new text trait which adds this functionality or you can use https://github.com/artf/grapesjs-custom-code

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.

Browse all topics