GrapesJS Issues

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

644 issues found

๐Ÿ” components
#1027April 10, 2018by kosirm3 answers
5 reactions

Newbie Questions and Ideas

First of all sorry because I'm using Issues as a help forum. I REALLY need some tutorials, examples, etc. If you need help, I'm willing to spend some time on this. For example GitBook or something similar. Wiki is great, but not really what I'm looking for. I believe that there is a ton of examples already on GitHub,...

chapterjason

How to save sections/blocks /components (for example to GitHub)? https://github.com/artf/grapesjs/wiki#storeload-data https://github.com/artf/grapesjs/wiki/API-Storage-ManagerHow to load remote sections/blocks (for example from GitHub)? ht...

kosirm

@chapterjason thank you so much for your time! So exhaustive answer I really did not expect ๐Ÿ˜ƒ Thanks again! ๐Ÿฅ‡

adelliinaa

Is there any tutorial on how to integrate customised components into the GrapeJS framework?

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

#1022April 9, 2018by suthars2 answers
0 reactions

[BUG] 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.

#1014April 7, 2018by tommedema3 answers
1 reactions

[Question] making preview mode remember if visibility mode should be restored or not

Currently when you enable preview mode and then disable it again, it always turns on visibility mode, even if visibility mode was turned off. This can be rather annoying. I would like to create a PR to fix this, but could use your advice because I'm not completely following how you would do this properly in the way yo...

artf

I really like the idea, what about keeping track of all commands status at Commands level?!? Like for example, on any runCommand(CMDID) we gonna store it inside Commands.active object (eg. active[CMDID] = 1) and clear on stopCommand. Then...

tommedema

@artf I can probably do it if I can ask some questions here along the way. I'm still getting used to Backbone. Where would you put that Commands object? Could you elaborate more on this?I'd like also to move the runCommand/stopCommand logi...

artf

For Commands I mean the Commands moduleCould you elaborate more on this? I'd like, for example, moving this Editor. runCommand logic inside the Commands module, so in the Editor we will get:

#1004April 4, 2018by gabrigcl3 answers
0 reactions

[FEATURE REQUEST] Enhance "draggable" attribute of components in order to allow excluding certain components when wildcard "*" is set for draggable components

Hi. I wish to enhance "draggable" attribute of components in order to allow excluding certain components when wildcard "*" is set for draggable components. For example, according to my case: I need the "video" and "image" component to be draggable on every component, except the "mycustomcomponent". My suggestion is to...

artf

You mean something like draggable: "*:not(your-component)"?

gabrigcl

Yes, I liked your thinking!

artf

Inside draggable and droppable properties you can pass any CSS-like query string so it's already possible

#990April 1, 2018by anand-gopinath2 answers
0 reactions

How to listen an event for custom component's style update?

@artf @arthuralmeidap @nojacko I have a custom component like, this and i the code looks like https://jsfiddle.net/nganand/n97g7g43/ . How to listen to an event when custom component's property changed (Ex, when styling padding/margin)? like init() { this.listenTo(this.model, "component:styleUpdate:text-align", this.h...

artf

For component's properties use this.listenTo(this.model, "change:prop-name" ...By doing ...attributes.align = "left" Component doesn't see your changes, use instead this.model.components().at(0).addAttributes({ align: 'left' }), you don't...

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.

#966March 21, 2018by faizansaiyed3 answers
8 reactions

[QUESTION] How to load external CSS file into Grapes Editor?

Hey, During my editor = grapesjs.init(), I want to load an external CSS file into the canvas using @import url(...). So when I use my custom components which are using those external CSS stylings, should render properly. Also, those URL should include in editor.getCss(). How can I do that? Thanks in advance.

chapterjason

https://github.com/artf/grapesjs/issues/195 https://github.com/artf/grapesjs/issues/473 https://github.com/artf/grapesjs/issues/444 https://github.com/artf/grapesjs/issues/66 Here are some solutions, please search next time before open an...

faizansaiyed

Thanks for the help. This works perfectly. I tried searching issues with @import query, my bad.

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.

#964March 20, 2018by anand-gopinath3 answers
0 reactions

Component properties configuration

@artf Sorry to post it again, It will be the continuation of #952 I just discussed the approach with MJML community and our conversation went like this https://github.com/mjmlio/mjml/issues/1063#issuecomment-374526777 Please have a look at this. So in order to avoid heavy load time and other MJML limitations and I hav...

anand-gopinath

@artf Can you please check this

artf

You should definitely use Custom Components, which is exactly the same way I do in grapesjs-mjml but, in your case, instead of relying on MJML renderer you would do it on your own logic

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.

#959March 16, 2018by tommedema3 answers
1 reactions

[BUG] Intermittent test failure on `dev` branch due to race condition

I recommend adding --bail after the mocha command in package.json's test to make this easier to see, e.g.: On the latest dev branch, this is easy to reproduce by simply running npm test many times: Sooner or later you will get: This seems to go away if you .skip this test in test/specs/selector_manager/e2e/ClassManage...

tommedema

I haven't seen this in a while. Will close for now.

artf

Should we wait for all modules to have loaded prior to attaching the event listeners? Mmmm that piece of code is running synchronously so I don't think it's gonna help BTW never faced this issue within my environment ๐Ÿค”

tommedema

@artf it's easily reproducible here. Try to run it repeatedly as suggested above. Here's proof: My environment: OSX High Sierra 10.13.3 Node.js v9.2.1 Latest rapes dev branch commit #e6593e7ad9a For some reason this.get('DomComponents') re...

#955March 15, 2018by alexroosenstein3 answers
1 reactions

[Question]: Find component associated with HTML element in iframe/visual editor.

Hi! I'm working on an implementation of GrapesJS where I can a drag&drop a piece of text from outside GrapesJS into an existing text element/component. I don't use the drag&drop functionality of GrapesJS for this, but the native (browser) drag&drop. I have some code working for this, a working drag & drop, and I can c...

artf

You can query the wrapper to get component models, eg. BTW it's not clear why the content is not updating while you say I can change the text in the visual editor (inside the iframe)

alexroosenstein

Thanks! I'll give it a go tomorrow. By the way, I update the text via JQuery using the text() function, but when I move the element to a different position the original text reappears again.

japo32

I had the same issue where I move the component with drag and drop. My solution was to add a text component inside my custom component. :)