GrapesJS Issues

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

3464 issues found

#421October 14, 2017by edsonmartins2 answers
0 reactions

Language

I would like to know if the framework has the option to change language. Otherwise, how can I do this? Any suggestion? Edson Martins Brasil

artf

No @edsonmartins you have to set them manually via configurations (more about it #26 )

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.

#420October 13, 2017by momu-smartcoach3 answers
0 reactions

Problems at the beginning of reading souce code

I'm reading the source code from grapesjs,but i can't find the module cash-dom and underscore import $ from 'cash-dom'; import { defaults } from 'underscore'; anyone can help me? I'm a beginner,thank you!

momu-smartcoach

i'm try to replace ‘dist/grapes.min.js’ with 'src/index.js' in the dev demo, But it failed,anyone can tell me how to use the souce code,thank you!

artf

Sorry @momu-smartcoach but before diving in grapesjs's code I'd recommend to start with something more basic, check some of these: https://github.com/mbeaudru/modern-js-cheatsheet https://github.com/getify/You-Dont-Know-JS https://docs.npm...

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.

#419October 13, 2017by sanjeevSavitr2 answers
0 reactions

Adding New Elements in commands

commands:{ { id: 'submenuitem', run: function(editor, senderBtn){ const comp = editor.getSelected(); comp.view.el.querySelector('[data-js=submenu_container]').innerHTML += '<a class="navbar-menu-link">Sub Menu Item</a>'; }, }, } This can add Sub Menu Item to the container. But I am unable to select it. I tried with Ap...

artf

Read more about how components work You have to add components via model (eg. model.get('components').add('<div>...</div>')) if you want them to be selectable (you can't select elements without models). Like you did, it's just a static con...

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.

#418October 13, 2017by justvinz2 answers
0 reactions

Can't replace image if it's inside a link

Hi, If import this code inside the editor: And double click the image to change it, when I choose a new image from the modal, nothing happens.

artf

Ok, probably I have to set the Link Component not editable if children nodes are not texts. At the moment, you have to set it explicitly

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.

#417October 13, 2017by HarshOB3 answers
2 reactions

Add Setting button to custom component.

Hello, How can I create a setting or you can say edit button for my custom component? LIke 4th option on this image:

ateshuseyin

The above link I referenced before is only for adding button to toolbar. I think you should just follow below steps to complete your task;Create/Implement a editor according to your needs. grapesjs-aviary uses aviary editor (see)Define a c...

ateshuseyin

Hi @HarshOB, It is simple as image does https://github.com/artf/grapesjs/blob/dev/src/dom_components/model/ComponentImage.js#L32

HarshOB

Hello @ateshuseyin I don't want the same editor as an image I want to build my own. I just want to add that icon to my component and when I click on that icon I want to display area through the user can add text, image, HTML code etc and t...

#416October 13, 2017by 2uncle-code3 answers
1 reactions

image upload with cross Origin issue

I have checked all the issues history,but didin't find a way out. i changed here to allow fetch to cross origin access. my asset manager is fine and here is my php code also file uploaded successed but it shows me those errors and this is my console log

2uncle-code

hey,guys sorry to reply this late.I got another project of our company need to update in hurry last week.Anyway,the solution you guys provided works fine after i moved the files in same domain.But if you guys have time please take a look a...

mekamleshk

Hi @vtista The response from your php code should be like this : [{"type":"image","src":"localhost/test/img/wechat.jpg","height":"350","weight":"250"}], Trying removing the slashes like this : echo jsonencode($response,JSONUNESCAPED_SLASHE...

2uncle-code

@mekamleshk Thanks a lot,i just did as you said,but the issue was still there do you have any idea? :)

#413October 12, 2017by FrikkieSnyman3 answers
0 reactions

Use trait to modify component class

Hi! I'm trying to change the value of the classes with very little succes. Here is my custom trait's onValueChange function: Which results in an HTML output of: Obviously, this isn't legal HTML. It also produces weird results when adding or removing a class in the Classes input. What is the correct way to go about thi...

FrikkieSnyman

@artf Is this even possible?

FrikkieSnyman

So I got this figured out, in a quite hacky way, but it works! Just create a custom trait, and use the following for the onValueChange()

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.

#412October 12, 2017by ramkumar653 answers
0 reactions

Controls drag and drop not working

Hi, Grapes js html template designer is perfect, but the demo page controls drag and drop incorrectly placed to page. please help me......:)

artf

Seems to work fine on my side, provide a screencast of the issue, please

ramkumar65

here i attach screenshot. reply soon as possible. Thanks for reply

artf

You should drop inputs/labels only inside form

#411October 12, 2017by bayareawebpro1 answer
0 reactions

Asset Editor, Error on Remove

TypeError: null is not an object (evaluating 't.parentNode.removeChild') in remove: function()...

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.

#410October 12, 2017by mohammad-aqajani2 answers
0 reactions

example on video component

is there any example for adding video component the same way as adding images which have uploading dialog ?? any code would be appreciated! <div controls="" src="http://127.0.0.1:8000/media/PyQt4PythonGUI6FileBrowseButtonH9wtiVE.mp4" onmousedown="return false" class="gjs-comp-selected" style="height:607px;"> <video cl...

artf

No, but you can create a new Component by following this https://github.com/artf/grapesjs/wiki/Components and #286

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.