#2805May 27, 2020by EgorPashko3 answers
Hey guys I have some problem related to alert which displayed when I tried log out of page. Actually I do not know bug is it or something else. I have read documentation, but did not get answer yet. If you help me I will gratefully to you. Alert message is "Changes you made may not be saved."
Ju99ernaut
I guess the alert still shows up even if you have storage set up. Add this to your initialization: By default it's set to true
Ju99ernaut
It's probably because you have no storage set up
pjdevries
I thought about storage as well and was about to set up a dummy storage, hoping it would circumvent the problem. The noticeOnUnload: 0 works like a charm though, so no need for that. Thank you very much.
#2782May 17, 2020by joshbedo1 answer
I've been reading a lot of the documentation and closed issues but I'm a little confused on the best approach to render a page stored in firestore. For example I have a node.js backend using cloud functions and i was thinking i would basically have an API endpoint that pulls the page from the firestore and renders it....
artf
Hi Josh, storing and loading templates is described more in details here: https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates Basically, the editor stores 2 types of data: components and style, JSON result of your templ...
#2741April 28, 2020by Joshmamroud2 answers
Hello @artf , I'm not sure if this goes here but I can't figure out from the documentation how to update the component model based on a trait. The functionality I'm trying to achieve is add a text trait to a component called "condition" which would accept a Boolean expression. If this trait has a value then I would li...
artf
You just have to extend the toHTML function of the component model to achieve it (search in issues if you need examples)
Joshmamroud
Ok, I will take a look. Thank you!
#2739April 27, 2020by andy-awareNo answers
Hi, I've been looking to implement folders for the asset manager like this question: https://github.com/artf/grapesjs/issues/229 However, I can't find anywhere in the documentation to do this. And feel like I'm going around on myself. Any help is appreciated. Thanks.
#2730April 22, 2020by Lerdouille3 answers
Hi, is it possible to change easily some properties in the Traits configuration of a plugin ? I"m trying to translate some strings in the grapesjs-echarts plugin, and i kindy stucked after reading your documentation and looking for the functions to do so... Could please tell me if it's possible to change some options...
artf
You should be able to do it via i18n module
Lerdouille
Hi, thank you for the answer. I agree with you, it changes indeed the default labels on Traits (. But what about a plugin, or a component not added in the i18n module ? For example, the type "map" include in your initial javascript, how ca...
Lerdouille
Hi again, any idea to help me to update traits default properties after the plugin initialization ? In my previous sampe, i have a hard coded type 'map' in my grapes.js , i would like to update some traits properties in my html page with s...
#2721April 17, 2020by alex19893 answers
Hi I run into an error when I'm trying to import any locale file from 'grapejs/locale' by using es6 import I followed by the documentation: https://grapesjs.com/docs/modules/I18n.html#configuration but I always get this: I can import it only in next way Could you explain why I can't import it directly from grapesjs/lo...
padcom
With the change provided by PR #6459 it is now possible to do the following: Make sure you also load the styles correctly:
artf
Should be fixed in https://github.com/artf/grapesjs/releases/tag/v0.16.12
willGabrielPereira
It still don't works, only works from "src/i18n/locale/...." Using v0.20.3
#2718April 17, 2020by Lerdouille3 answers
Hi again @artf , you close my previous ticket but i don't succeed to reopen it i saw the documentation and the part reguarding i18n but i didn't succed to use it. In your documentation, you use some import function, basically my code is pretty simpler and without import, like this : <html> <body> <link...
pouyamiralayi
@Lerdouille your issue is not related to grapesjs, you have to reference your locale objects somehow which i suggest using global variables for them, and to import them, is basically a matter of including their related scripts inside your...
artf
Current code of locale files are optimized only for importing them via import, if you want to improve that PR are welcomeyou close my previous ticket but i don't succeed to reopen it There is no need to keep questions open if there is a ne...
Lerdouille
Thank you for your answers. I do succeed to display the good translation by tweaking the grapes.js. To do that, i had to copy/paste the part **/ "./src/i18n/locale/en.js": /!******************************!\ ! ./src/i18n/locale/en.js ! \***...
#2713April 15, 2020by Lerdouille2 answers
Hi, first of all thank you for this awesome plugin. Sorry for the request, but i spent a few hours to look for the answer on this github page and other documentations but i can't find the good solution to use i18n on this plugin... and translate the editor in french for example... I see in the src folder the locale di...
artf
@Lerdouille it's all explained here https://grapesjs.com/docs/modules/I18n.html
Lerdouille
Hi @artf , i saw the documentation and the part reguarding i18n but i didn't succed to use it. In your documentation, you use some import function, basically my code is pretty simpler and without import, like this : <html> <...
#2688March 27, 2020by peterlinus1 answer
I am very interested in this project but need some guidance please. Is there any documentation on what are the programming languages, frameworks, libraries, plugins etc used in this project? Any documentation explaining what each folder contains? Any guidance on how to get started to further develop this project would...
GoodPHP
Hello, for add changes to editor need know Javascript or looking for someone who know. Docs: https://grapesjs.com/docs/ Such a description as you want, will not be. The documentation describes the main methods. For example, you can check o...
#2674March 20, 2020by teawithfruit3 answers
Hello, I'm working on an integration of my localization system (i18n) with grapes.js. The idea is to have a data field, which will hold the i18n string. If the data attribute is set, grapes.js will take the string and make it visible in a settings field. If the settings field is altered, the data attribute is also alt...
artf
@teawithfruit if you expect something in your saved HTML page (outside of the GrapesJS editor) the only thing I see it can do is: So it does nothing, probably you're another victim of thinking that scripts inside GrapesJS editor will work...
pouyamiralayi
Hi @teawithfruit there are a couple of issues with your code: 1) you don't have access to `this as the model inside component script`: Component & Js docs 2) if your use case is to control an attribute, you don't have to provide a custom t...
teawithfruit
Thank you for the very helpful the answer! This is my updated Block/Component. Right now I've got just one more problem. The script function I've added to the component is not called in the saved html page. If I add the block to the canvas...