GrapesJS Issues

3,464 parsed GitHub issues โ€” 370 solved ยท 90 open. Search, filter and explore battle-tested answers.

644 issues found

๐Ÿ” components
#2328October 14, 2019by MariusDK1 answer
0 reactions

Cannot read property 'hasFocus' of null

Hey @artf I get the error Cannot read property 'hasFocus' of null when i press 'a', 's', 'd' and 'w' from the keyboard on input text components in the canvas. Uncaught TypeError: Cannot read property 'hasFocus' of null at Object.hasFocus (grapes.min.js:12) at run (grapes.min.js:3) at Object.method (grapes.min.js:12) a...

MariusDK

It's about keymaps: d stands for core:component-delete a stands for core:component-exit s stands for core:component-next w stands for core:component-prev To solve the error i have to use:Remove all binded keymaps editor.keymaps.removeAll()...

#2325October 12, 2019by adityaMurarka1 answer
0 reactions

How to use "append" create a structure for a side-menu in the editor and also is it possible to disable a plugin on selection of another one.

[Question]: 1.) I am trying to create a hamburger sidebar for the full-screen view instead of just the mobile view. But when we have dropped the plugin, on dropping any other plugin it is not getting a proper structure on the body to separate the other content and is overlapping. Is there any way to avoid it. 2.) Also...

artf

If you need to customize a component read and understand how they work here: https://grapesjs.com/docs/modules/Components.html You have total control over the component in the canvas by using its View

#2321October 9, 2019by glassdimly2 answers
0 reactions

Drag and drop re-ordering of components?

I've got a several bolt-interactive-steps within bolt-interactive-pathway and I wish to order them, but grapesJS dragger only allows me to drop it inside bolt-interactive-pathway to be appended to the end: no ordering. This is compounded by the fact that this actually works about 10% of the time.

artf

Is it only within Layers or also on canvas? Can you create a reproducible demo, please?

no-response[bot]

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...

#2310October 5, 2019by AbdallaMohammed3 answers
1 reactions

[QUESTION] How can I specify position for dragging elements ?

Hi iam doing a project with this library and i want to specify position for dragging components in it for example i have a div with id="drag-here" i want all components to be dragged in this div only i hope you can understand me , thank you all

pouyamiralayi

i don't have components iam using blocks according to this: i have a div with id="drag-here" i assume your block is something like this: the approach for your container block would be: and for target blocks: cheers!

pouyamiralayi

i have a div with id="drag-here" i want all components to be dragged in this div only if by this you mean you want all components to be draggable only in your target component, you can use `draggable` property. by specifying draggable on y...

AbdallaMohammed

by specifying draggable on your components like this: thank you for fast replay , but i don't have components iam using blocks

#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

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

#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?

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

#2285September 22, 2019by megarg2 answers
2 reactions

[Question] Cannot add new trait

I am trying to add a new trait but it is not working. I have done quite a bit of research and tried multiple ways but it still does not seem to be working. Can you please guide what I may be doing wrong. Option 1: Option2: Trying to add programatically. I am following doc from: https://grapesjs.com/docs/modules/Traits...

pouyamiralayi

Hi there! i do not see any reason why your first approach is not working! did you try this one? cheers.

megarg

This is working now. The original code is working.