I have created a component var comps = editor.DomComponents; var defaultType = comps.getType('default'); var defaultModel = defaultType.model; var defaultView = defaultType.view; comps.addType('module', { model: defaultModel.extend({ defaults: Object.assign({}, defaultModel.prototype.defaults, { droppable: false, edit...
When I save my page in a database refresh, the html and css are set like so $.ajax({ url: "../feeder.php", type: 'POST', processData: false, contentType: false, data: fd, success: function(result){ var response = JSON.parse(result); html = response.html; css = response.css; //editor.CssComposer.getAll().reset(); edito...
artf
@alikabeer32 follow the BUG template please, without a demo it's hard to understand the issue
I am trying to save the template data into the database. Currently I have it working successfully. It posts the Assets, Components, Styles, Html, and CSS data (just like how it saves into the browser's localStorage) to a PHP script. As I found out, the Components part ( editor.getComponents() ) contains the Html struc...
alikabeer32
Is your javascript code actually getting set? It might be because the framework, by default, doesn't set js when you run editor.setComponents(yourhtml); const editor = grapesjs.init({ ... allowScripts: 1, }); this might help you. All the b...
lajby95
@alikabeer32 Hmm, that seems to have solved the problem. Thanks!
Hi @artf , I have created some custom components with traits. I save the file and reload not able to see the attributes in the editor and in preview mode. However those attributes can be seen in the code manager. Is there anyway to make show it? If i give any event based on the attributes events are not getting trigge...
artf
Please read carefully this part https://grapesjs.com/docs/modules/Storage.html if it's still not working, open a bug issue and create a reproducible demo
I'm currently using GrapesJS to build an editor for blog posts in my website. One of the things that I wanted to change from the default behavior was the inability to "unlink" a piece of text that had been converted to a hyperlink using the rte toolbar. So I wrote the following function: The function allows you to uns...
artf
Is this an issue with how components are handled by grapesjs? Could you help me understand why this might be happening and what I can do to address this? Yeah, it's how the built-in text component and RTE work, so I'd just update your resu...
I want to open a modal on clicking to anchor in the provided html in grapesjs Editor. I have bind onClick event on anchor but on clicking to that anchor takes to prevDef method of grapesjs which triggers 'event.preventDefault()'. So is there a way to disable it or a way to open a modal on clicking to that modal?
artf
Can you show use a live demo of your example?I want to open a modal The modal from the template or the one from GrapesJS?
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...
there should be a feature to switch toolbar from right to leftI can't find any option to add a property like action in case of a form, name in case of a form element & on click action(if possible)
Hello there and thanks for this well crafted and very helpful project. I was wondering if is there any guide according to integrate third party component libraries into the ecosystem, by libraries i mean those that provide us with custom elements like these: https://framework7.io/docs/introduction.html https://onsen.i...
ghost
my bad, i just go through the "components and js" in the documentation i think you guys have think of every aspect. brilliant work. thanks in advance.
Hi, Hope you all have a good day. I'm looking on edit html function. In that, I changed the view of edit window like export modal. (ie, Separate window for Html and CSS). I can edit the content. I need to get the content (html & CSS) which is in modal window while I click the save button. Now I used . It gives the con...