GrapesJS Issues

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

3464 issues found

#2299September 29, 2019by rushmabaj331 answer
0 reactions

Move components with same class?

Hello! Is there any way to change position of all components with the same class? For example, I have two divs with class name 'title' and 'location'. And there are several other components with the same class names: When I drag the component with class name 'title' and drop it below 'location', all the other componen...

artf

No, classes are made for sharing styles and not the structure

#2297September 27, 2019by umerrinayat3 answers
2 reactions

[Question] Add script using drag and drop that will add elements dynamically

Hey. Thank you for this great project. I'm using it in one of my project and need some help. 1- I have a block element with script in it. This script add a form dynamically inside a iframe. When I drag and drop the script in anywhere on the page. Grapesjs ignore the position and render the form at the end of the page....

umerrinayat

Finally it is solved @pouyamiralayi Thank you for helping me out. After using your solution. It insert the script at correct position.

pouyamiralayi

Hi! did you try putting your script in the script tag? this way it will be executed at the end and probably will respect the order you desire: cheers.

artf

When I drag and drop the script in anywhere on the page. Grapesjs ignore the position and render the form at the end of the page. To be honest I don't know, it's all depended by the third-party library (in your case GetResponse) and how it...

#2296September 26, 2019by hellocaio1 answer
3 reactions

[QUESTION] How to customize StyleManager input components?

The demo version on GrapesJS site has some custom style input components (i.e. opacity slider, "undo" button by the property name...) How is this achieved? Is there anyway I can use them with my own plugin? Also how do I get my custom sector properties to behave like the buildProps? In my case I have to translate all...

artf

The demo version on GrapesJS site has some custom style input components (i.e. opacity slider, "undo" button by the property name...) How is this achieved? Is there anyway I can use them with my own plugin? Those are part of the configurat...

#2293September 26, 2019by mtasic-realware3 answers
0 reactions

Updating grapesjs with internal [site specific] changes

Hello. Is there a way to switch to lastest grapesjs version keeping changes we made to the code for our internal use? Changes are in most cases small and regarding tweaking css and js logic -but we need those changes [mostly requested by client]. Changes are made on unminified version on grapesjs. I will extract all c...

artf

Indeed this is what happens when you update the core library, it's hard to upgrade.What procedure should i follow ? There are no specific procedures, you just need to rewrite your custom logic in the new version and hope the code isn't cha...

mtasic-realware

Can I download source code , add changes to new js file (that will alter default component or block behaviour) and include that file in project ? Aas a matter of fact - that's the way plugins are made , right ?

artf

Aas a matter of fact - that's the way plugins are made , right ? No, with plugins, you don't touch the code of the library so the upgrade is safer and easier

#2291September 25, 2019by brentonkelly1982No answers
0 reactions

Color Picker Issue

[BUG]: Hi! I'm having a problem with the integrated color picker. When I click on a text component, go to the style manager, click on my character group, and finally click to launch the color picker, I'm getting a "Cannot read property 'length' of undefined" JavaScript error. You can see my issue here. I'm currently u...

#2290September 25, 2019by JCKodel1 answer
0 reactions

[FeatureRequest] New trait type: component relationship

I have a custom component that will render the results of a remote query inside a component, so, I added a text trait on my block manager so the user can select the query selector for the destination component. It would be nice if there were a trait called "componentRelationship" that renders a target button. When we...

artf

Thanks @JCKodel for the suggestion, I like it but I also think it might a bit overwhelmed for being placed in the core library. Probable in this case it would be best to define a custom Trait

#2289September 25, 2019by JCKodel3 answers
3 reactions

[FeatureRequest] Allow to import javascript modules

When using Ionic StencilJS, the components are imported using the new module support: On {canvas: scripts: []} I can only load external scripts by their url. To cover such case, we could import modules as this: The final result inside canvas would be: Notice that this would cover also the case when we want to use inte...

artf

Nice I like it, for anyone interested in making a PR the code to update is here: https://github.com/artf/grapesjs/blob/aee18dcf0602e5d56e7670deb8d4ffbf31c73008/src/canvas/view/CanvasView.js#L140-L161

devtechk

Hi can I start from yours code to init grapesjs not in the html file but in a separated js file? Thank you

rywilson28

@artf it looks like this feature has been implemented. There is a minor issue where type will default to 'text/javascript'. For HTML 5 it should be omitted but should not cause any issues if there. Should this issue be closed?

#2288September 24, 2019by hellocaio3 answers
3 reactions

[QUESTION] Why stylable and unstylable props not working?

First of all, excellent project! I love it! Very complete all-around. I've been reading and re-reading the doc and it is a steep learning curve. Anyway, I would like to serve a template to the user with restrictions in styling. I have been trying to use stylable and unstylable props like this: <h1 data-gjs-unstylable=...

pouyamiralayi

Hi there! for your first problem: i think this property must be specified on your component type definition. for your case it would be something like this: for your second problem, see if this can help you out. cheers.

hellocaio

I see! Thanks man! I will give it a go. :)

artf

@ColdTuna You wrote the attribute incorrectly, it should be <h1 data-gjs-unstylable="[\"float\"]">Title</h1>

#2287September 24, 2019by seowhui1 answer
1 reactions

Show only specific style managers when selecting components

If you select a component in the editor, you want only the Style Manager for that component to appear in the Properties pane. For example, how do I make the sort style manager visible only in the div tag? Is it possible?

pouyamiralayi

Hi there! see if this can help you out. if you want to show style manager only for your specific type, you can initialize editor with no sectors specified for styleManager, then use this approach to add your sectors when your target type i...