GrapesJS Issues

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

3,464 issues found

#2167Jul 25, 2019by yrbn1 answer
0 reactions

Adding component via text editor

Is it possible to add custom or default(for example "Link") Component on caret by clicking button in ckeditor?

artf

no, you can't do it while you're in editing mode

#2166Jul 24, 2019by froderf3 answers
2 reactions

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();

#2165Jul 24, 2019by sdrebel2 answers
0 reactions

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...

#2164Jul 24, 2019by CimattiConsulting1 answer
0 reactions

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)...

#2162Jul 23, 2019by miky95853 answers
4 reactions

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...

#2160Jul 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...

#2157Jul 22, 2019by paigefos11 answer
0 reactions

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

#2156Jul 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

#2155Jul 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

Browse all topics