GrapesJS Issues

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

3464 issues found

#1330August 1, 2018by FrciSmrci2 answers
2 reactions

[Question] Drop and drag restricted classes

Hey @artf , is there a possibility to restrict the drop and drag functionality to elements classList containing some class or classes instead matching it? Thank you in advance! :)

artf

You could make use of this special attribute selectors div[class~="some-class"], [class~="some-other-class"]~= contains word*= contains^= starts with$= ends with

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.

#1329August 1, 2018by inventorbit3 answers
4 reactions

Question: How to use same CSS for Multiple pages

Hello Grapejs Team, We've been working on Multi-page Website Builder. For each project there will be multiple html pages with single common "style.css" page. I am lazy loading each page with the following function - for handling multiple page loads The above page loads the page properly however, if page is empty or di...

cjpollard

This should work. `var editor = grapesjs.init({ keepUnusedStyles: true, ... });`

artf

@inventorbit next time, if someone solves your issue, close it

inventorbit

@cjpollard Thank you very much :) It's working. You saved my time...

#1328August 1, 2018by jorgecgll2 answers
0 reactions

[Question/bug] Reordering components in the canvas

I've noticed some inconsistencies when moving DOM components around in the canvas. Description in the gif below using the Webpage Demo: In my case, I do see the DOM component "moves" being reflected when I output editor.DomComponents.getComponents(). They actually get reordered, but the Canvas does not reflect those m...

artf

Never had time to debug it but I think it caused somehow by components with float: right style applied

jmrgz

Yes, it is related to the float right property. Actually, that is the real behavior of the float right property (the last html element appears the first) so I do not see an easy solution.

#1327July 31, 2018by ezequiel-thalamus2 answers
0 reactions

[QUESTIONS] Replacing selected text and getting html

Hi! Im trying to replace selected text with a code (random code). It's works, i can see the code, but when i do editor.getHtml() not. If i deselect the component (selecting another one) the change takes effect. Thanks!

artf

The content of the model is actually updated once you blur from the editable component, so when you call getHtml it's just not yet there

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.

#1326July 31, 2018by CCsoh1 answer
0 reactions

Is it possible to disable move and delete bar

WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick...

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.

#1325July 30, 2018by ploutos273 answers
1 reactions

How to disable drop for specific blocks/components

Hello, with the following code we are able to indicate if it's possible to drop other component(blocks) inside that particular component...: We are looking to indicate if it's possible to drop other components only for specific blocks. For example: A. Container Block - > we want to drop only columns B. Column Block -...

artf

From the https://github.com/artf/grapesjs/releases/tag/v0.14.17 you get data-gjs-type on all rendered components, therefore you can do something like this: droppable: '[data-gjs-type="column"], [data-gjs-type="other"]',

ploutos27

Thank you! :)

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.

#1324July 27, 2018by jvillena3 answers
1 reactions

Remove attributes from a component

Hi @artf I don't know if it is possible to remove an attribute from a component. In our project I'm injecting a custom attribute from a custom trait that I created but there is an option to unselect this attribute so I would like to remove from the component. I couldn't find the functionality on your code. Thanks in a...

artf

alemenciones

@artf hi man!, can you say me some alternative to remove attributes?

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.

#1323July 27, 2018by jvillena2 answers
0 reactions

Loading HTML content inject ids belongs to styles

@artf When I load the html content, this is including in all the components a random identifier that in your examples "Websites" and "Newsletter" I don't see them. So How I can force to keep my stylesheet and don't use random identifiers in all the components? I'm asking you this question because if I change the ident...

jvillena

@artf I've just fixed I was including the variable avoidInlineStyle: true, and it has to be avoidInlineStyle: 0

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.

#1322July 27, 2018by YashPrince3 answers
0 reactions

Disable editing in Preview Mode.

@artf How can we disable editing in the preview mode and re-enable it when preview mode off. I want to remove editor and hide toolbar in the preview mode so that user can only view the changes and can not edit it also all the editable option should be come when user stop the preview mode.

jvillena

You can use: editor.stopCommand('sw-visibility'); editor.runCommand('sw-visibility');

YashPrince

@jvillena I have used this code but it is not working. editor.on('run:preview', () => { editor.stopCommand('sw-visibility'); }); editor.on('stop:preview', () => editor.runCommand('sw-visibility'); });

ghost

Hi Artur ( @artf ), I need to add save and publish button so is there any plugin available or do i need to hardcoded. Can you please help me.

#1321July 26, 2018by maryia-kabash2 answers
1 reactions

[Bug]: Image component is not deleted

The bug is reproducible on GrapesJs demo page. Steps to reproduce:Drag&Drop or select an Image component.Click delete icon from the toolbar. Result: nothing happens, as ed.Canvas.hasFocus() (file commands/view/ComponentDelete.js) returns false.Select any other componentSelect image again and try to delete it. Result:...

artf

Thanks Maryia, it should be actually fixed with the latest version https://github.com/artf/grapesjs/releases/tag/v0.14.25 (same as #1298)

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.