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