#2636March 11, 2020by mcottret2 answers
Hello again :) Our team recently started customising the editor & removing the webpage preset, and we might have found some bugs related to the preview mode: When using the built-in preview mode with custom panels, the custom panels are not hidden when entering preview mode. If we look at the source, the preview comma...
artf
A proposed solution would be to rather loop through the panels collection (retrieved via editor.Panels.getPanels) and toggle their visible attribute. What do you think ? Yeah, it makes totally sense. Go ahead with the PR, thank you very mu...
mcottret
Great ! #2669 opened.
#2635March 10, 2020by micker3 answers
hello i search a lot but i didn't find how to load a css file inside editor My code regards of other issue i add styles: [\'http://localhost/flexidev/templates/shaperhelix3/css/template.css\'] no real error but no style ... what i forgot ? function fclayoutinitbuilder(editorsfx, elementid) { /*Lets say, for instance,...
pouyamiralayi
@micker you must include them like this: I do not see the `canvas` object in your setup. Cheers!
pouyamiralayi
@micker if your `customCss` is a url, that's the way to include it. but if you you have some styles that you want to include by hand, here is the procedure: Cheers!
micker
i try to use https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates but i not sure about this ... if i add canvas like this i have this error seams doesn't link `canvas: { scripts: null, styles: [\'http://localhost/flexide...
#2632March 9, 2020by micker3 answers
Hello i trying the absolute mode ! its realy good but to be complet with this designer mode did you plan to add rezize module via drag and drop ? regards
pouyamiralayi
@micker you must specify `resizable:true` on your component type definition. Cheers!
pouyamiralayi
@micker if you want to go with blocks, you have to do it like this:
#2631March 9, 2020by HansSchouten2 answers
I am trying to update the textNoElement of the Style and TraitManager, but it does not seem to be working. See the result here: https://jsfiddle.net/zrobkL80/5/ Also the default StyleManager sectors disappear, any suggestion on what I am doing wrong? I am using the the latest GrapesJS version (0.15.10).
artf
Those options were removed, you have to use the i18n module
HansSchouten
Ok thanks, I will look into it.
#2630March 9, 2020by micker3 answers
hello its possible to add a button to switch of designer mode ? absolute / translate ? regards
pouyamiralayi
@micker you need a command for that which executes: `editor.setDragMode('absolute')`. for panels & buttons you can refer to getting started guide. Cheers!
micker
ok maybe a switcher mode can be in basic panel ?
micker
hi thanks did you think it possible to mix twice mode for more ? are its too early ? because when i test i can put text inside a column for exemple ... it will be good to use absolute position in column and put yexy block inside it to move...
#2629March 9, 2020by vitor-peixoto1 answer
is it possible to create or get a react component from some library and insert as a allowed component for create a template?
pouyamiralayi
@TRUEND here is an example Cheers!
#2628March 8, 2020by abzal03 answers
Hello @artf thanks a lot for a great project, I have created a new type, it is similar to regular link, but the link title updates with ajax. Then updates the trait 'linktitle'. The value of it and the canvas do update, but the trait inside "Settings" still shows the initial value and does not changes. Part of the cod...
pouyamiralayi
@abzal0 alright! although the prop approach must work fine, i am not sure why it is not, or i am missing something here! if we want to go with attributes, you must use `addAttributes` for changing the attribute, here is a working example o...
abzal0
@pouyamiralayi thanks a lot for your time, this solved the issue: this.model.addAttributes({'linkTitle':oldValue + ' Changed!'}) you saved so much time, thanks again :)
abzal0
editor.getSelected().getTrait('linktitle').set('value','CCC'); does not works too
#2627March 8, 2020by GoodPHP3 answers
Hi There, We want promote our new design for GrapesJS. Our work: https://github.com/GoodPHP/GrapesJS-devfuture You can write to us any questions: [email protected] Write your opinion below. Do you like?
GoodPHP
have you implemented dynamic data layer using the CMS? I implemented page builder websites like: https://wix.com/ https://www.websitebuilder.com/ https://www.squarespace.com/ Where users can buy domain, connect exist domain, create website...
pouyamiralayi
like below: <img width="349" alt="Desktop 2017-03-14 at 6 06 23 PM" src="https://user-images.githubusercontent.com/53266765/76199255-c7d15f00-6204-11ea-8c9b-52a4ea1f2dc1.png"> <img width="351" alt="Desktop 2017-03-14 at 5 10 46 PM" src="ht...
pouyamiralayi
@GoodPHP great work! do you have plans on integrating grapesjs with a cms?
#2626March 6, 2020by ikenderham3 answers
Hello i thinking of making a function that move component up or down in the canvas, when a button beeing pushed. Is it possible, and can anyone show me how to do it? Maybe this future is allways there?
artf
You can do something like this to move components
ikenderham
Hello Thanks for the answer.. But how do I add the button to component toolbar? I tried the examples on issues/266 but its not working here. Can i overrule the toolbar in another file, so i dont need to change the core files?
ikenderham
I found out how to do that. the code you provided me is not working for me. I tried to add it in a command, but its not moving the component up or down. Here is a example: If i have a row with content inside, then i need to move the contai...
#2625March 5, 2020by DRoet1 answer
Hi @artf, What would be the recommended way of calling a grapesjs method from within a plugin? The grapesjs-mjml plugin uses this.MethodName() (https://github.com/artf/grapesjs-mjml/blob/7a9712ce7a401079f31932a7fe2c342657e85efa/src/components/index.js#L248) However when the plugin gets minified in the production bundl...
artf
Probably you would need something like this in any case, seems really weird that the minifer makes such an unsafe removal. I use something similar here and it doesn't break