GrapesJS Issues

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

3464 issues found

#2166July 24, 2019by froderf3 answers
2 reactions

[QUESTION][REQUEST] How to remove a block?

editor.DomComponents.getWrapper().getEl().insertAdjacentHTML('beforeBegin', letBlock) letBlock letblock is a variable that contains HTML. Question:How to remove this adjacent HTML?is there a function like "insertAdjacentCSS()"?

zgover

You touched on a few questions here, but to get to your first in your headline; reference the BlockManager api docs here e.g.

artf

You're mixing too much stuff in one question and without any context

froderf

@artf I just wanted to remove the new block that I added via editor.DomComponents.getWrapper().getEl().insertAdjacentHTML();

#2165July 24, 2019by sdrebel2 answers
0 reactions

[QUESTION] How to extend style manger Sector's property

Hi @artf , We have created a custom asset manager which is working perfectly for image component. However we are not able to call custom asset manager for background image. Tried to access using this methods var stm = editor.StyleManager; var fileType = stm.getType('file'); stm.addType('file',{ model: fileType.model,...

artf

Hi @sdrebel can you show us your implementation of custom asset manager? If you have followed this you should see it also in the Style manager

no-response[bot]

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...

#2164July 24, 2019by CimattiConsulting1 answer
0 reactions

[QUESTION] How to overwrite classes manager?

Hi @artf , Is there a way to modify the attribute where the classes are placed? (default: class) is there also a way to change the position and tag of the styles? (default: <style>)

artf

Is there a way to modify the attribute where the classes are placed? (default: class) Not really, the only thing you can do now is to extend methods from base components. This is where is assigned in the model (used in the final HTML code)...

#2162July 23, 2019by miky95853 answers
4 reactions

[QUESTION] Show Component settings

There is a way to show "Component settings tab" on component click? I'm trying editor.on('component:update', function(propertyName)... but I cannot find a way to show the second tab ("Component Settings")

selcukcura

Here's a cleaner approach:

miky9585

Thank's @selcukcura

miky9585

I've solved in this way. But I'ld have a more grapesjs friendly solution editor.on('component:update', function(propertyName){ if(typeof propertyName.changed.status != 'undefined' && propertyName.changed.status == "selected"){ $('[data-ori...

#2160July 23, 2019by martysweetNo answers
0 reactions

Absolute mode: editor is not defined

Hi, Great project, thanks! In relation to issue #1936 there is a bug on the following line which causes exceptions when attempting to drag an absolute component when the variable editor is not defined in the window scope, for example, if you have instantiated the editor inside a React class, or not used the name edito...

#2157July 22, 2019by paigefos11 answer
0 reactions

[Question] How to secure code and everything?

Im currently using PHP to upload to my MySQL database. I heard it is best to save everything as TEXT or MEDIUMTEXT. But the question is, how should I protect everything and make sure no one is uploading malicious code? I am using the custom code plugin as well so the user can add custom javascript code, but how can I...

artf

Sorry but this question is totally off topic here, try to use Stack Overflow for similar doubts

#2156July 21, 2019by paigefos11 answer
0 reactions

Cannot change existing block's icon

Hi all, great JS plugin btw! Im new to programming and i would like to know a few things: I want to set the icon as a "heading" icon from font awesome but it not doing it and its not throwing any error. thanks to everyone for all the help and great plugin!

paigefos1

Never mind, it was because I put it in editor.onload, it should be outside of onload

#2155July 20, 2019by Thebleach01 answer
0 reactions

Possible to have multiples BlockManagers on one Editor ?

Hello, thanks for the hardwork, grapesjs is very good :) Just wondering, is it possible to add multiple blockmanagers on one editor ? The code hereunder won't work for me : grapesjs.init({ blockManager: [ { appendTo: '#albumeditorpanelleft', blocks: [ ... ] }, { appendTo: '#albumeditorpanelright', blocks: [ ... ] } ],...

artf

Yes, use the blockManager.render() method with external option set to true