GrapesJS Issues

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

829 issues found

🔍 question
#1488October 9, 2018by rgernale1 answer
0 reactions

Multiple Block Mangers

WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick...

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.

#1484October 8, 2018by mararn16183 answers
1 reactions

[Question]: Textblock subsequent rows do not give cursor/richtext editor when clicked, but are selected instead

I have noticed a strange behaviour in my adaptation of GrapesJS concerning the richtext editor and the gjs-blocks-basic plugin. Whenever I drop a textblock and start writing, I will end up with one component for the dropped block and several sub-components for each row (see elements in screenshot with data-gjs-type="t...

mcsekar12

https://github.com/artf/grapesjs/issues/761

mararn1618

Thanks, my issue seems to be a duplicate of https://github.com/artf/grapesjs/issues/761 I have tried GrapesJS 0.14.33, which should contain the fix for 761, but unfortunately it gives me a new exception within the richtext editor, which I...

mararn1618

I fail to recreate an isolated demo to reproduce the new exception, but I have found that the exception will also occur with GrapesJS 0.14.25, i.e. it was not introduced recently.

#1483October 8, 2018by krisnaw3 answers
1 reactions

[QUESTIONS] Make a component that can't be removed.

Hi there, Is it possible to make a component that can't be removed or without remove the trach icon when it clicked? Thanks, looking forwards.

Skovmissen

I think what you want is data-gjs-removable="false" add that as an attribute to your div like. <div data-gjs-removable="false">Hello World!</div>

krisnaw

Hi, @Skovmissen Thanks for your responses. It's worked.

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.

#1475October 2, 2018by shlomoko3 answers
0 reactions

[Question] adding filter to styleManager

Hi, I am trying to add a filter property to Styles. The problem that I am having is that the property demands 2 arguments: 1. The type of filter 2. The strength. e.g filter: blur(10%). the problem I am having is that when added to the css file I am getting- filter: blur 10%. I understand that I should be using propert...

artf

Hi @shlomoko to make the filter work properly via stack type you have to add a custom style manager type, because, as you already noticed, you have to deal with dynamic stuff (eg. functionName). Unfortunately, we didn't document that part...

artf

Hi @shlomoko I've created a plugin with the filter type input https://github.com/artf/grapesjs-style-filter You can use it with the latest release https://github.com/artf/grapesjs/releases/tag/v0.14.40

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.

#1472October 2, 2018by detectedstealth3 answers
3 reactions

[QUESTIONS] Custom Code block and JS

Wondering if there is a limitation or is it actually possible to create a block that allows the user of the editor to write custom javascript code as they are building the template? For example drag and drop a custom code block and write the javascript in it? Example: I created a link and wanted to capture the click e...

cjpollard

Try grapesjs.init({ allowScripts: 1, ... });

cjpollard

That just means you won't see the code, but you get something to see and click on to edit it. The JavaScript itself is there and works just fine.

cjpollard

https://github.com/artf/grapesjs-custom-code

#1471October 1, 2018by alfaalex813 answers
2 reactions

[Question] Blockmanager and Image

Hi! I use this code to add a new block: blockManager.add("image", { label: 'Image', category: 'Basic', attributes: { class: "gjs-fonts gjs-f-image" }, content: { style: { color: "black" }, type: "image", activeOnRender: 1, }, }); How can add a custom class to the img tag when i drop into canvas? Thanks.

arthuralmeidap

@alfaalex81 For the content object, you can add a new index called classes. This index needs to be an array of classes, which will be applied to the new Image block; Final code:

alfaalex81

Awesome! I have another question for the same argument. I need to create a custom block with an image inside, for example: <div> <ul> <li> <div><a href="#link"><img src="" alt="Title Image" /></a></div> <a href="#link" >Title</a> </li> </u...

arthuralmeidap

This is not the current grapesjs's behavior. the AssetManager only opens if you dropping directly am img block. You must have to select the img block within your custom block and execute a code like that:

#1470September 28, 2018by mgotovkin-plana3 answers
7 reactions

[Question] Possible memory leaks

Hi, I am working on a project with Angular 6 and I am investigating a memory leak after destroying the editor on _previousAttributes and possibly coming from underscore bind function So,Why not using native bind and other functions?I figure out that there are couple of underscore libraries inside grapes.js file 1.8.3...

artf

I apologize but this is not yet solved. I've discovered that after removing the component the reference to its DOM was still there. Unfortunately, removing the reference brokes the Sorter, so I have to figure out how to refactor it properly

artf

Just a quick update, I'm working on this issue here, so far memory leaks with components seems to be fixed, now I'm trying to solve the one with destroying part (a bit longer as I have to isolate each module, a bit of mess in each of them....

artf

@BrainMaxxx would be glad to have a help on this :)

#1459September 25, 2018by gabrigcl2 answers
1 reactions

[QUESTION] How to store "data-" attributes into the html tag of the component

Hi, I'm developing a plugin for charts using chart.js. In order to the generated template render the chart from a data model generated by the plugin, I need to store this model into the html tag of the component. The model used by the chart is like this: And have to be stored this way: However, I don't know how to do...

gabrigcl

I have seen there's method, I'll test this and close this issue.

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.

#1457September 25, 2018by Stejsi2 answers
2 reactions

[Question]: Custom asset manager background-image in Style Manager

Hello, i want to use custom Asset Manager i am used this solution, ` var assettarget =''; editor.Commands.add('open-assets', { run(editor, sender, opts = {}) { const modal = editor.Modal; const styleManager = editor.styleManager; assettarget = opts.target; modal.setTitle('Add new image'); var $test = $("<iframe style=...

artf

@Stejsi inside opts you have onSelect callback which should update stuff in Style Manager. Unfortunately, it only accepts asset (object) as the argument (my bad, I'll make it also understand strings) so, for now you have to do 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.

#1451September 22, 2018by snehalseth2 answers
0 reactions

[QUESTION] how to use custom jQuery plugin ?

I am trying to use a custom jQuery plugin for the block but the plgin is not working coz of the iframe as i am not able to access it inside the iframe. how can i run jQuery plugin for the block ?

artf

https://grapesjs.com/docs/modules/Components-js.html

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.