GrapesJS Issues

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

1,399 issues found

πŸ” outdated
#449Oct 25, 2017by alissonphp2 answers
0 reactions

Can i load editor content dynamically?

I have a API rest that receives and supplies the contents of the editor items. The entire store created by the editor is saved: assets, components, css, ... Each item is accessible via route (eg editor / page / 4), when loading the route API returns to the content of the item, however when calling the action editor.st...

artf

If for content you mean html/css, probably you're looking for editor.setComponents('<div>...')

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.

#448Oct 24, 2017by ateshuseyin3 answers
1 reactions

How to remove SelectorManager

I don't want SelectorManager in my project.

ateshuseyin

@thecodefish It works. Thanks. @artf This issue can be closed.

artf

What do you mean? SelectorManager is necessary to keep the collection of classes, it's a part of the core, you can't remove it

ateshuseyin

At the top of style manager UI, there is Classes section. I want to remove it from UI.

#447Oct 24, 2017by ateshuseyin2 answers
1 reactions

Multilanguage support: There is some static texts

Hi @artf, As you describe before in #26, multi language support is possible using configuration. But there is some static texts in the project. For example https://github.com/artf/grapesjs/blob/88c262be2409734b276d2c22b1f7080ea8359ba1/src/trait_manager/model/TraitFactory.js#L30

artf

πŸ‘ I'll update for 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.

#446Oct 24, 2017by fzs19943 answers
11 reactions

Collapsed Category in Blocks when Grapes Editor is loaded

Hello, I want all the categories listed in Blocks, must be initially in collapsed condition when the Grapes JS Editor is loaded. How can I do that? Also, if any one category is clicked, all others gets closed just like accordion. Is this possible? Thanks!

artf

Try with this

fzs1994

Wow man, Thanks a lot! Sneak Peak: :heart_eyes:

faizansaiyed

Give your custom class and set styles with the background image Eg Code: In bm.add block and in CSS

#445Oct 24, 2017by suchithmahadi3 answers
0 reactions

Calling a function which is outside the component same as explained in issue #395

I am calling a function which is outside the component same as explained in issue #395 but it is returning a string instead of a function I want to call defaults.drawGauge function in script and pass the id that is created dynamically I am stuck please help me out grapesjs.plugins.add('liquid-gauge-plugin', function(e...

artf

If you want a function attached inside the string you have to pass a string

suchithmahadi

Sorry @artf i didn't understood what exactly you are saying, can you please elaborate? Here i want to call the function ("drawGauge" which is in 3rd line) in domComponents script function. Please explain related to the problem given above....

artf

Inside your script property, {[ d ]} will be replaced with a d property of the componet and it can't be a function, so if your final result should be like this: you have to set a string for d

#444Oct 23, 2017by ronaldaug3 answers
6 reactions

How to load css link into the head tag?

Hello, First of all, thanks for contributing such an amazing js framework. I am very new to grapesjs. And github too. https://github.com/artf/grapesjs/wiki/Components-&-JS#template-related According to grapesjs wiki, I load js links inside the canvas as the above codes and it works fine. But when I try with css links...

artf

You were almost there :)

ronaldaug

Thank you so much @artf , it works like a charm.

coder-strange

You have to include separately while rendering, it won't come in getHtml() or anything.

#443Oct 21, 2017by roytang2 answers
0 reactions

Is it possible to restrict that only one of a certain component can be added to the canvas?

We want to define a custom component that may or may not be added into the HTML, but we want to disallow adding more than one of that component. Can this restriction be done in GrapesJS?

artf

Not something built-in, but definitely achievable by using the GrapesJS's API Extremely easy would be adding a listener (eg, change:changesCount), search your component and then apply your 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.

#442Oct 21, 2017by roytang3 answers
0 reactions

Is it possible to include an external stylesheet in the grapesjs canvas?

We want to create some custom components whose style changes according to an external theme css (there can be different themes), and we want those styles to appear in the canvas while editing.

roytang

Please ignore. I ended up injecting the stylesheet link using javascript into Grapes' canvas' iframe // insert external stylesheet into the grapesjs window var iframes = Utilities_GetElementsByClass("gjs-frame", "IFRAME", document.body); f...

artf

You can inject scripts/styles via canvas config option

roytang

Thanks!

#441Oct 20, 2017by santiph3 answers
0 reactions

Ignore/avoid changeCount

Due to https://github.com/artf/grapesjs/issues/436, I cannot rely on StorageManager's Remote Load method to load a template from a REST endpoint, so I'm falling back to alternatives as editor.setComponents() and editor.setStyle() (being used within a command, so grapesjs and editor are available). Unfortunately, those...

artf

Hi @santiph well, if the problem is onbeforeunload you can disable it with noticeOnUnload

santiph

Hi @artf I need to warn the user know of any unsaved changes consistently. And skip it when there's nothing new to be saved: When a new empty template is created, right after saving or right after loading a template, no confirmation messag...

santiph

I could test it with remote storage fully: onbeforeunload is disabled, as expected, on closing right after saving. Unfortunately, it's still being displayed on closing right after loading a new template. After a little debugging, loading a...

#440Oct 20, 2017by ateshuseyin3 answers
0 reactions

Not works with jquery

I use jquery in my project. After version 0.12.8 it does not work with jquery. Prt of my webpack.config is; When I try to drop a block it throws;ComponentsView.js:76 Uncaught TypeError: Cannot read property 'length' of undefined at child.addToCollection (ComponentsView.js:76) at child.addTo (ComponentsView.js:22) at t...

artf

Do you get the same error with all of your blocks? Even with some official one?

ateshuseyin

Right. I get the same error with all blocks defined in mjml plugin.

artf

Ok, I'd like to understand if it's something related to jquery. Are you able to reproduce it without the mjml plugin? (latest version)

Browse all topics