GrapesJS Issues

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

644 issues found

๐Ÿ” components
#674December 22, 2017by nestor91sanchez2 answers
1 reactions

custom component don't save

my custom component don't save in wrapper editor, when refresh the page the editor load all components less my component. the web inspector show a empty div. <img width="531" alt="screen shot 2017-12-22 at 3 14 08 pm" src="https://user-images.githubusercontent.com/2053807/34309887-d8a7a5e8-e72a-11e7-823e-5aeea5197866....

afotey

If you're referring to having your generated content save and persist upon refresh, try this: var editor = grapesjs.init({ container : '#gjs', storageManager: { // type: 'none' id: 'gjs-', // Prefix identifier that will be used inside stor...

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.

#648December 15, 2017by effectief2 answers
0 reactions

Panel may be moveable but prevent move, remove properties on the childs

Hi, How can I prevent move, remove properties on the childs? In this case (see code below) the user may move the parent (Template2), but all the childs may not move. I tried it with 'propagate', but these properties are applicable to the parent too. I need an option too aply properties specifically on childs. blockMan...

artf

Hi @effectief, create a wrapper for children with that propagate property

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.

#628December 11, 2017by AH1N13 answers
3 reactions

exclude components from final html

Is there any ready solution to exclude some components from final html? Or any other mechanism that makes component exist only in view?

ryandeba

Hi @AH1N1, By "final html", do you mean the value returned from editor.getHtml()? And are you referring to a custom component? If the answer to both of those questions is yes, then you should just be able to override the toHTML method of y...

ryandeba

@AH1N1 Here's a working code example: https://jsfiddle.net/tt32z2uz/2/. Open up you browser console and you should see this logged out: <div>here's some normal content</div><div>...more normal content</div>. Does that give you what you nee...

artf

Hi @afotey What about if I wanted to return just the ID of a div as entered using the Component Settings panel? Id assigned from component settings goes directly inside attributes therefore you can use this Is there a way to have the expor...

#620December 7, 2017by xeux3 answers
0 reactions

Remote Storage

I'm trying to use the remote storage but no success, with the resolved issues I manage to adjust eveything as it best, but editor do not render loaded HTML. GrapesJS: JSON: {"gjs-css":"", "gjs-html":"<div>HELLO</div>", "gjs-assets":"[]", "gjs-styles":"[]", "gjs-components":"[]"} Load event: GrapesJS seems to be loadin...

DeathStapler

I had similar problems. Look at the issue I created. Issue #597. My issue related to the use of contentTypeJson: true, but you already have that in yours.

artf

GrapesJS seems to be loading okay, I put the editor.render() after the init and also inside the load event to try out. You should use editor.render() only with autorender: 0, so remove it

xeux

@DeathStapler thanks, I was able to load the urlLoad with that setting. @artf still not able to render the editor, the console shows the loaded urlLoad but nothing on editor, also in the view source button. I'm using the latest version.

#604December 4, 2017by AH1N13 answers
0 reactions

trigger after removing component

Guys I need to trigger some action after removing editor's components. Is there any way to do so? Or have I to write my own trigger?

ateshuseyin

There is not an event related with your requirement. You can easily override tlb-deletecommand. I created a sandbox for you https://codesandbox.io/s/k2yoxjjr95. If you want to handle programatically removed components, I don't know how to...

AH1N1

That's exactly what I've been looking for :) Thank you! I wrote 'after' but I should have written 'when' ;)

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.

#594November 30, 2017by absolution543212 answers
4 reactions

Help Wanted: make this an angular app to support Angular-Material forms

was thinking of converting this into angular app, I am able to add md- form components but iframe is not rendering any material view, however exporting it to another html file with angualr enabled understands this any leads on why angular material is not working inside iframe, even though angular's js files are includ...

duskhacker

Sorry, I can't answer your question, and I'm probably speaking out of turn; It seems to me that your time would be better spent on taking on some of the "help wanted" issues and bugs than forking this into the Angular framework. To me, it...

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.

#554November 22, 2017by ryandeba3 answers
0 reactions

Prevent hover highlighter and prevent selecting certain components

Hi @artf, I would like to get your thoughts on the following 2 items before submitting a pull request. These are to satisfy requirements for a project that I'm currently working on, but I'm hoping that they could have a place in grapesjs core.Prevent the hover highlight effect on certain components. Components already...

artf

Prevent the hover highlight effect on certain components. Components already have a "highlightable" property that is being used for the dotted outline style. I was thinking about using that same property to prevent the hover highlight effe...

ryandeba

Thanks for the feedback! I've created a couple of pull requests for these items, let me know if you want to discuss further.

artf

Merged, Thanks Ryan ๐Ÿ‘

#553November 21, 2017by baxxos3 answers
2 reactions

Adding new components to existing ones

Hello, I would like to ask if there's any existing support or API for adding new components to an existing component list (e. g. after fetching or generating them dynamically). I'm talking about something like this: I've studied the documentation and the closest I got is the function. Unfortunately, this function spec...

ryandeba

Unfortunately I am not aware of a simple way to get a specific component object without recursively iterating through them to find the one you want, but that sounds like a great idea! You might be able to do something like this to get all...

baxxos

Thanks for your replies, I think my question has been answered and there's not much else to add. I'm closing this now, however the find() method would be a welcome addition to this awesome framework.

ryandeba

Hi @baxxos, Are you trying to do something like this: https://jsfiddle.net/ztqsugaw/3/?

#529November 15, 2017by krunal0392 answers
0 reactions

editor.setComponents(html) reset to default traits values on editor

#522 thanks for all help was able to resolve via this.model.attributes. but now I have another issue, where editor.setComponents reset value in editor of html retrived to default traits values. Application flow 1) User redirected to grapesjs editor to edit page content, where they can use different components 2) On sa...

artf

@krunal039 editor.getHtml() it's your FINAL output and obviously, there are no pieces of information about traits and other stuff. Store and use editor.getComponents() then, if you need the user to edit templates again.

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.

#528November 15, 2017by krunal0391 answer
0 reactions

Model and Component sample code and issue

@artf Sorry for creating another issue but I tried below code also I have created codepen for same. Codepen and still it only return empty div via editor.getHtml(), I can see html updated in canvas but not on model. Also updateSrc() and updateh2Content() function has var linkModel = this.get("components").at(0); undef...

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.