#387October 6, 2017by mekamleshk3 answers
Hi @artf @sonnylloyd @arthuralmeidap @cmcintosh I am trying to store template name, but not sure how to pass the template name along with template data. I mean I want to store template name and template data with the help of one single submit button. Below is my code :
daniel-farina
Since you are already loading php in this file why don't you pass that as a url parameter: I would advise to have all this running under a user's session with tokens, etc but for now that should do the trick.
mekamleshk
@daniel-farina I am trying to save the template name from a input text box and not the templateId
artf
Well, there is always an option to use your custom ajax call where you might just add getHtml and getCss to your data. If the use of editor.store() is necessary you can add/update params (which will be passed with any request) on RemoteSto...
#386October 5, 2017by RuudH3 answers
Hi Artur, First of all grapesjs is awsome! At the moment i am trying to puzzle together how to create a pannel with a button that opens a new view, like the blocks and layermanager buttons do. I want to render my own set of items in that new view. I am looking at the code you use to open those views but that uses the...
daniel-farina
A good practice to get familiar with GrapeJS would be to attempt to duplicate the blocks manager and create your own. You can accomplish that by editing the files below. A good example would be to copy the src/blockmanagerand call it src/s...
Moikapy
Hey, was looking into doing something similar and found this here. Was wondering if there is any documentation further explaining the process of creating new views.
artf
Hi @RuudH thanks for the suggestion, I hope to publish soon something more about this argument. For now, I can only suggest you check commands used for those panels (eg. OpenBlocks)
#385October 5, 2017by suchithmahadi2 answers
Hi Artf, Please give a complete SVG Component with Script example.
artf
Just put an SVG inside your template and the editor should be able to parse it
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.
#384October 5, 2017by mekamleshk3 answers
This is my code to Create a new template and insert the inline html with style into the database : I am able to insert the template-data into database in this manner : <table style="width:100%"> <tr> <th>created_at</th> <th>id</th> <th>template-name</th> <th>template-data</th> </tr> <tr> <td>2017-10-05 12:13:09</td> <...
arthuralmeidap
@mekamleshk open the Developer Tools and see if the XHR is happening for the urlLoad and what is the response
artf
Duplicate of https://github.com/artf/grapesjs-preset-newsletter/issues/17
mekamleshk
I can see this createdat:"2017-10-05 13:17:36" id:"121" template-data: <table class="list-item" style="box-sizing: border-box;"><tr style="box-sizing: border-box;"><td class="list-item-cell" style="box-sizing: border-box;"> template-name:"...
#383October 5, 2017by daniel-farina3 answers
Hi Again everyone, GrapeJS is too much fun once you get deep into it. I have a simple question: What's the best way to load the css from a newly created element to the properties panel. For example I have the following box which has a black background: The black background comes from the style in the element The edito...
daniel-farina
@artf I undertand now I completely missed the checkbox next to each selector. Setting the forceClass to false solves all my problems! I dont really need that as I'm keeping the source code extremely lean with as little divs as possible. Th...
daniel-farina
I discovered that if the div has no class and just style then a single class is created and the background is applied to the properties panel: so that would be a partial solution for now but still looking for a better alternative.
artf
Hi @daniel-farina you don't see .c1019's background because your component has two classes so, by default, the Style Manager select the CSS rule where the selector is a combination of all its classes, in your case .col-8.c1019. If you want...
#382October 5, 2017by mekamleshk3 answers
I am trying to store the html and inline css , can you please in how to pass it to editor.store() function. @artf
sonnylloyd
@mekamleshk editor.store() function gets the html, components, css, html and styles and passes it to storage:store event and you can access it like you have above im sorry if i have miss understood what your asking but it looks like your t...
mekamleshk
Please recheck my code i have updated it. @sonnylloyd @artf I want to store inline html var html = editor.runCommand('gjs-get-inlined-html'); into mysql database using editor.store() function
artf
duplicate of https://github.com/artf/grapesjs-preset-newsletter/issues/16
#381October 5, 2017by tomichal2 answers
The line below does not seem to work for when the "text" parameter is a string. Should the "typeof text === 'text'" really be "typeof text === 'string'"? Is there even ever a "text" type in Javascript? According to this source there isn't: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Datastructures Thanks f...
tomichal
Ah, just saw this: https://github.com/artf/grapesjs/issues/372
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.
#380October 4, 2017by sambuev3 answers
It doesn't upload images from PC, only from webs-earch, other option did not work either, something with API.
artf
yeah probably there is an issue with the Filestack's API, I'll check later
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.
#379October 4, 2017by sambuev2 answers
Can't find the option to export my template... where is this button? Can't find.
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.
#378October 4, 2017by sambuev3 answers
Can't find any option to change the color of bg? I want to place my own image (how?) and change the bg of the div-layer. Can't find this option yet.
sambuev
Found it in the demo. I wanted to upload the image, but it only takes it, refreshed thr window and do nothing. Is this limitation of the demo version? I using only demo from the official website.
artf
Check here about the uploader https://github.com/artf/grapesjs/issues/380
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.