GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

1,399 issues found

πŸ” outdated
#1034Apr 12, 2018by vladbpython3 answers
0 reactions

Insert element or block inside parent element

Good day, i have component, have block i have Trait on listen changes, how can I add "h1 " inside that block "'<div class="container" style="min-height:10px;"></div>". How to add tag inside this model like:

artf

Given the current model you can add other components in this way model.components('<h1>Hello world</h1>')

ionic666

@vladbpython hi,do you solve this problem?i also want to know how to drag one element into parent element.

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.

#1033Apr 12, 2018by nojacko3 answers
0 reactions

When IDs are used, it's not possible to update or remove a style

Steps to reproducehttps://jsfiddle.net/1cjjr02p/Click the text in editor, change background colour.Export CSS. You'll see both new and original colours exist in an order that prevents the new colour being used. ` 3.. Using same jsfilddle, it's not possible to remove CSS attribute. This is similar to #552 #986 but the...

nojacko

To elaborate a little, it seems to be when you apply styles to a box it adds the ID. When you export that and reload it to Grapes the problem happens.

artf

Related to #932 Use avoidInlineStyle: true

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.

#1032Apr 12, 2018by tommedema3 answers
2 reactions

Multiple font-face at-rule CSS rules are not processed

Latest version of grapes #cfde1c1 If you supply a single @font-face, this is parsed just fine: JSFiddle example: https://jsfiddle.net/szLp8h4n/140/ Screenshot: <img width="1395" alt="screen shot 2018-04-11 at 3 19 56 pm" src="https://user-images.githubusercontent.com/331833/38646200-d5c4260e-3d9b-11e8-8c41-7c3c6b1f67d...

tommedema

@cjpollard thanks, but it seems like you are taking apart something that was stitched together for the wrong reason. I believe a better approach is to not stitch together these at-rules in the first place. @artf I have submitted a PR for t...

artf

Totally agree with you Tom, the main goal of cssComposer is just to provide a lean interface for style definitions. What we have inside CssParser right now it's actually a browser's parser and the rest of code is just a traverser. Actually...

tommedema

@artf FYI I can now reproduce this in a failing test case: After further debugging this seems to be caused by cssComposer thinking that the second rule is the same rule as the previous one and then returning the first rule: https://github....

#1031Apr 12, 2018by francesca-cicileo2 answers
0 reactions

Custom icons

I want to add a custom icon to the grapesjs panel at the top of the editor page. Is it possible to do this with any SVG or with text? If so, can you explain how? I've tried the following but couldn't get an icon to show: I've also tried this to use text as an icon, but couldn't get that working either: (I'm also using...

artf

At the moment, there is no label property on buttons so you can edit them only via className. BTW I like the idea, I'll make it available in the next release

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.

#1030Apr 12, 2018by francesca-cicileo3 answers
0 reactions

Firing events with custom components

I'm trying to build a plugin for Grapesjs with some custom components, and I'm having trouble with triggering events and interacting with the component in the code. One problem I am having is that I added an attribute to the model for a custom text component. In the script for that text component, I change the attribu...

arthuralmeidap

Just for tests purposes, try to listen all changes on your model. try with this.listenTo(model, 'change') and see what you get.

artf

@francesca-cicileo 'change:*' is used for model's properties (eg. tagName, removable, etc.), probably you're looking for change:attributes:ATTR-NAME. Be sure to update model's properties properly (eg. model.addAttributes({ attrName: 'value...

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.

#1029Apr 11, 2018by cmcintosh2 answers
0 reactions

Feature Request: Add Grippies for Resizing elements

Add Grippies and utilize jquery_ui or another similar mechanism for resizing elements.

artf

We have already a Resizer utility which fits perfectly our needs

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.

#1026Apr 10, 2018by phucphanJaneto2 answers
0 reactions

GrapeJS can't render HTML code

Hi, I intergrated GrapesJS to my application (asp.net MVC) and it works but sometimes GrapesJS can't render HTML. First, I clone html from another URL and add this html to GrapesJS. This works correctly. Second, I get html from GrapesJS editor and save this to file. Final, I refresh page and load content in this file...

artf

Seems like you're doing something wrong when saving/loading the template, look at the error, it's trying to use ":{"s as an attribute

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.

#1025Apr 10, 2018by vladbpython3 answers
1 reactions

How add new traits to custom block

grapesjs.plugins.add('CustomBlocks', function(editor, options) { options = options || {}; TraitsToComponent(); addHTMLCodeComponent(); addHTMLCodeBlock(); function TraitsToComponent(){ editor.TraitManager.addType('content', { events:{ 'keyup': 'onChange', // trigger parent onChange method on keyup }, /*Returns the inp...

chapterjason

Could you please provide more information? And could you please indent your code correctly that it's getting rendered by github?

vladbpython

Please help me

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.

#1022Apr 9, 2018by suthars2 answers
0 reactions

Drag and drop blocks are not working in IE Browser

Hi, There is some bug related to "Drag and drop blocks are not working in IE Browser ", I didn't get better solution regarding this issue. Also there is no method to reinitialize the grapes editor. Here is my below script: grapesjs.init({ container: '#gjs', plugins: ['gjs-blocks-basic'], components: newscontent, stora...

artf

Fixed here #768 will be available in the next release

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.

#1021Apr 9, 2018by FrciSmrci3 answers
0 reactions

Style Manager sectors

Hey @artf , due to the lack of documentation I have a hard time figuring out, how to add component settings (traits ) to the Style Manager panel section as you did in the demo. Could you please give me a hint how to implement this? I think that the demo project code if open sourced would come real handy when it comes...

artf

I think that the demo project code if open sourced would come real handy when it comes to understanding of the grapesjs as a whole. It is indeed, the whole site is open sourced, you just have to switch the branch https://github.com/artf/gr...

FrciSmrci

@artf Omg, thank you. :) Not sure how I manage to miss this.

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.

Browse all topics