GrapesJS Issues

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

3464 issues found

#544November 20, 2017by mohit55403 answers
0 reactions

Add select with optgroup

Hello @artf I have recently started using grapeJs and found it awesome. Can you please help me on How can I add dropdown(select) with optgroup inside trait. Or is there any custom option available like 'html' where I can add my own html traits: [{ label: 'PartialName', name: 'selectPartial', type: 'select', changeProp...

artf

Hi @mohit5540, you have to define a new Trait if you want custom stuff

mohit5540

@artf yes, I created custom trait and it worked. Thanks.

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.

#543November 19, 2017by brandonburr863 answers
2 reactions

Blocks Manager in GrapesJS Not Working For Columns

Hello, My installation of GJS ties in all of the default blocks. Every block drags fine onto the page with the exception of all the "columns". i.e: 1,2, and 3 columns. When I drag them.. it does nothing. What should I do? Brandon

brandonburr86

Okay I'll get that working and do a PR

brandonburr86

I see in the inspector that the "row" css class is non-existent. I checked the demo and see that the "row" css class is put in dynamically into the "gjs-css-rules" block.

artf

@brandonburr86 about what demo are you talking about?

#542November 18, 2017by duskhacker3 answers
1 reactions

Calling render() on PanelManager breaks style manager

In lieu of #540, I'm trying to manually remove a button from the options panel, with this: This works ok, the button goes away, but the pnm.render() seems to break the style manager, in that it becomes unresponsive. Non of the other stuff seems to break, just the styling. Is this a problem I'm introducing or a bug? Th...

duskhacker

It occurs to me that I can just hide the button with some CSS, which is what I've done. I'm still curious about the render though.

sbarfurth

This should be high priority, makes modifying panels after the first render impossible.

artf

I'm closing this as we've removed render method from the public Panel API, it should be executed only on init by the editor. In addition, now you can remove buttons easily by doing this panelManager.removeButton('panelId', 'buttonId')

#541November 17, 2017by kickbk3 answers
1 reactions

updatesrc on image change

I must be missing something, but when I change an image, the localstorage html isn't updating, however, changing the text does. So when I refresh the page after changing an image and text, the text remains, but the image not. Is there a setting I need to change to make the localstorage html update the image src?

artf

Thanks for the catch @kickbk, actually src was not listened. The fix will be available in the next release

jmrgz

Hi @artf This is not working in the current demo (neither on my side). If you change any image and reload the page, the image goes to it's previous src. It's not working the first time you load a template. If you add new images in the curr...

jmrgz

I had to solve this using a workaround and it seems like a good solution at the moment. I have created my own localstorage and I'm saving the template on $(window).on('unload... and loading it again on $(window).on('load'

#538November 17, 2017by Geczy3 answers
0 reactions

Clicking component always opens styles first, even if I override

When I click the component, I want the traits to open Clicking a component opens the styles. Clicking it one more time will finally open open-tm the traits manager. How do I override opening styles on click?

artf

Hey Matt, probably you're using the code from the demo and therefore you're conflicting with this https://github.com/artf/grapesjs/blob/gh-pages/js/grapesjs-preset-webpage.js#L257-L268 just try to remove that part

Geczy

Good thinking, thanks ! Overwrote it in .init before render

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.

#537November 17, 2017by michaellwatson2 answers
1 reactions

Adding a request header on beforeSend

Im using storageManager remote but the site has csrf token beforeSend: function (t) { var token = $('meta[name="csrf_token"]').attr('content'); if (token) { return t.setRequestHeader('X-CSRF-TOKEN', token); } }, Gives an error "Uncaught TypeError: Cannot read property 'setRequestHeader' of undefined" obviously because...

michaellwatson

Instead of beforeSend, use the headers like this headers:{'X-CSRF-TOKEN':'foo'},

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.

#536November 17, 2017by edwardjiawei2 answers
0 reactions

Better Alignment for Block in Block Manager

For example, Block for 2 Columns and 2 Columns 3/7 's font awesome and label are not aligned

artf

If you're creating your editor you can easily tweak some CSS (eg. change the font size of blocks), don't see this as something to "fix" at the core level

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.

#535November 17, 2017by vishal50333 answers
0 reactions

New section in View Container

Hello, I want to add a new section in view container. Lets say, when we click Style manager it opens style manager. I want to create similar behaviour. Need to show some pre-defined templates which should be shown under that section. Can you please help me out?

artf

To add more buttons there Then create yourCommand Command, which might be very similar to https://github.com/artf/grapesjs/blob/dev/src/commands/view/OpenBlocks.js

Amir2828

Hey did you manage to create that new templates view? If so I would like some pointers as I try to do something similar

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.

#532November 16, 2017by tomichal2 answers
0 reactions

Error when trying to hide some elements from the Layers Manager

Steps:Go to http://grapesjs.com/demo.htmlOpen Layer Manager.Click on the "Build your templates without coding" text element.Click on the "eye" button in the Layer Manager to hide the element. Result: The following exception is thrown: Uncaught TypeError: Cannot create property 'display' on string '' and the element is...

artf

Fixed with the latest version https://github.com/artf/grapesjs/releases/tag/v0.12.37

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.

#531November 16, 2017by vishal50333 answers
1 reactions

Help wanted : I want to set panels on the left side and editor on the right side

Hello, I want panels to be shown on the left side and editor on the right side of the window. Can you please help me out

artf

Be aware that from https://github.com/artf/grapesjs/releases/tag/v0.14.5 #gjs-pn- are now .gjs-pn-

JuanTincho

Hi! I managed to do it with a plugin on a project that we are working on. I don't know if @artf would like to implement it in grapesjs.

vishal5033

Hi @JuanTincho , Can you please provide me that plugin. I also want to implement tabs in the panel menu. If you have some details about that also. Can you please share with me, it would be very helpful.