Hello, I would like to ask wether my code is ugly and makes my localhost version do something bad or I'm not using the commands add correctly. To be more accurate, wherever I put the 'header index.php', even in an event that shouldn't be executed by itself, I will still be headed to index.php whenever I go on my grape...
Hi, I know that we add the traits options or properties for any component blocks. but I don't know how to add the traits for canvas body. can anyone please help me. In the above image. under the settings options. I need to add one input and radio button.
artf
You can add them at run time https://grapesjs.com/docs/modules/Traits.html#updating-traits-at-run-time
Hello, how do I change the "Layer" in text shadow. I need to translate this ... Thank you
ghost
I do not think you can do that... but you can change the html of the page when the style is added or updated using jquery or javascript. Like replace(/Layer/g, 'Other') in editor update.
parmando
This is interesting ... but I can't implement it in practice.
parmando
Eu não acho que você pode fazer isso ... mas você pode alterar o html da página quando o estilo é adicionado ou atualizado usando jquery ou javascript. Como replace(/Layer/g, 'Other')na atualização do editor. How can I do this? It would be...
When the rte section of the editor config is defined, I'm assuming that the defined default actions should reflect the actions array: Meaning that this should should only render the bold action Instead all default actions are instantiated: 'bold', 'italic', 'underline', 'strikethrough', 'link' See: https://codesandbox...
artf
mmm wrong key in docs... it should be thanks for the report
Hi guys, has I know that we use external string values in script function by assigning the variable with value in custom triats. but I tried to pass the object or array. I didn't get the correct values. i really stuck on it can anyone please help me. my traits:- screenshots in the above screenshot. myModelCount value...
artf
@Ramkumar-Murugesan objects/arrays are not supported yet, we'll add them in the next release. For now, if you need an object/array in the script, create another property with a JSON.stringify version of the original (set a listener on orig...
Hi @artf, can you please tell me what is the fastest and easies way to extract component styles. I have template and in this template you can edit part of header, footer and add content between them. I don't store the whole template just the content in the middle, header & footer. component structure is easy I loop th...
abozhinov
I don't see a problem with media queries. The rules are detected by selector and everything works fine. I add class and set style only for mobile and it works.
artf
Yeah, styles are in a different container (editor.CssComposer.getAll()) so it's a bit harder and there is no API for extracting all matching styles. What I'd suggest doing something like this BTW this is not a final solution, definitely, y...
Hi! Is there a way to get general, last editor updates using editor.on('update') event? Something like this: editor.on('update', e => { // get the event // get the specific, recent updates (HTML and CSS) })
olgertpysqyli
Hello. You can declare variables for html, css and js and their value is going to get updated every time when editor change event is triggered. change() { this.html = editor.getHtml(); this.css = edito...
gabd1411
I've found another available event, editor.on('change'), but it seems difficult to read the HTML and CSS updates from this event
Is there any way to replace all default icons with SVG? I know that it is in roadmap, but maybe there is a way how can we do it now manually?
artf
Default icons are applied via classes so the only way is not to use them and add a custom SVGs inside the target element. BTW the current active issue about this is here #644
Hello and thank you for GrapesJS. It's awesome. I do have a question that I haven't been able to find an answer to. I'm using PHP/Yii and MySQL db. Your example for external storage config:storageManager: { type: 'remote', urlStore: 'http://endpoint/store-template/some-id-123', urlLoad: 'http://endpoint/load-template/...
smik3
Is there any reason why you can't use PHP to save it directly as a JSON file rather than on the database?
arievanden
I probably could, but we need to saved to DB. I'm OK, a developer figured it out for me, but it would be great to have some more detailed code examples for use with php/mySQL. Your docs are great, but this would be a nice addition to your...
artf
My problem is that I'm trying to get the HTML to JSON conversion formatted properly GrapesJS, by default, generates 4 types of data: HTML, CSS, Components (JSON from HTML), Styles (JSON from CSS) So you shouldn't do any kind of conversion....
Hi, Locally installed GrapesJS and the addon 'preset-webpage', which gets me a basic layout with some blocks. One of those blocks is the video block. I can drag&drop a video on the canvas, but am not able to set a youtube url. In the demo I see, in the right sidebar, a Settings option. I'm missing that one in my insta...
artf
No, the video component is part of the core, so if do this editor.addComponents({ type: 'video' }) even without any plugin you should see the video traits correctly
jeff-panart
Hi artf, Hmz, then I think I did something else wrong.. adding the editor.addComponents line, doesn't make any difference. In my index.php I only have a div with gjs as id, and here I also call some assets (stylesheet and grapesjs script f...