Hi there, I have some question about canvas style, in this case i have config like this. By default i use css with name builder-desktop.css for default canvas style. And then i want if i change Device Manager and choose mobile, i can change a canvas style to builder-mobile.css. Thank you very much
hibuno
Hi there, Forget it i solve this problem, just add event on change like this. Thank you
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.
I need the function to copy the html/css code in the view code component automatically. Is there a predefined function? or I must implement this directly?
hibuno
Hi @poirin , I have some solution, last week i have this problem too i try to save current HTML & CSS without manual copying. And below is my code . --- Add custom panel eg. left top button (save button). And then create save function Good...
artf
If you're talking about storing your templates int DB or any other remote endpoint you can setup the built-in RemoteStorage, take a look here #778
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.
Hi, First off, this is what I've been looking for for a long time so thanks for your efforts. Next, I'd like to add a font in the Typography | Dropdown list. How do I go about adding one? Note: I've seen the posts where you suggest adding a new stylesheet but I want it to only apply as per the Typography options. I al...
IceCrystal0k
This is how i added new fonts to the style manager: Call this functions either after initialize, or on editor.on('load', ()=> { .... addFonts() ... }) if you use a preset like newsletter preset that alters the style manager after load. als...
artf
Hi @webnoob currently the only way to do so is to add it via the initialization object. Here is the snippet from the demo https://github.com/artf/grapesjs/blob/gh-pages/demo.html#L1045-L1062 As you see can see I don't specify any font fami...
webnoob
Thanks for this. Based on what you showed me above, I've used the StyleManager to add the extra font in, like so: I suppose using this method I would need to import the actual font via a stylesheet into the editor for it to actually work o...
I've implemented a new plugin that adds another button in the export window, it's working fine. However when the page displays there isn't a space between it and the existing "Export ZIP" button. How might I go about adding a space the grapesjs way? Is it just figuring out which html dom element properties to tweak? ....
ryandeba
Hi @kewilson, If I'm understanding your issue correctly, I bet setting the left margin instead of left padding would work a lot better...is this screenshot close to what you're trying to accomplish? If so, you could replace your button.sty...
ryandeba
Hi @kewilson, This is a bit difficult to work with without a live code example (like a jsfiddle demo), but I'm seeing a few issues:let buttons = editor.Modal.getElementsByTagName("button") || {};This is probably throwing an error since edi...
kewilson
ok so button.style.paddingLeft = "30px"; works but I've noticed that the border area where the buttons reside don't distinguish between the two .. i.e., no button border around each button's text. Because the Export ZIP button is not under...
I'm trying to create two inputs (width and backgound-color) to template's body and I would like to fix it in Panel's view. When a component is selected, these two inputs must be there. How can I do it?
artf
@JulyanoF so you just need to style the wrapper?!?
JulyanoF
I guess its the body and no wrapper I need to style. I would like to use colorpicker too, like style manager
artf
Like the current public demo which allows updating the body's background?
I'm re-declaring a link type like this: When my button (<a>) is created, it is creating like this: <a class="btn botao-roxo">Botão</a> I would like to know how can I change the content of this (Botão) in traits.
JulyanoF
Exactly what I was looking for: Define new Trait type
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.
What I'm trying to accomplish: I have a piece of code I need to run when a component is "dropped". I put "dropped" in quotes, because it needs to fire when the tlb-move ends. So as a user, if I click the Move icon in the toolbar, when I finishing moving the component I need my code to fire. I've tried quite a few even...
artf
Have you tried with Components-&-JS?
maxtacco
Having the same problem - I can't figure out an event on a component to listen for when move ends.
maxtacco
So, the only way I was able to make it reasonably work was to listen for the "selectedComponent" event that is fired in https://github.com/artf/grapesjs/blob/b62e032b06f45382849b59e6a3f32049f0a021fc/src/commands/index.js#L168 in my compone...
WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick...
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.
hi @artf , I import a html , using import from grapesjs-preset-newsletter, with some css classes inside the <style> tag. After the import, when I call editor.getCss(), some classes that I added before are missing now. I checked that those css classes are not been used anywhere. QQ: The CssComposer module removes the u...
artf
QQ: The CssComposer module removes the unused css classes? Yeap
arthuralmeidap
Nice, thanks!
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.
Hi, I've read the Traits, Components and API wikis, grepped all the open & closed issues. I've even found the code where you are creating the defaults (ID, Title, Alt) you have today. There have been similar questions asked but none answer the question at hand. For every HTML component I want to add another default at...
ryandeba
Hi @kewilson, You've got a few different approaches for how to accomplish this...if every single component needs this custom trait, then I would probably override the initialize method of the default component type and add it there. Someth...
kewilson
Hey @ryandeba thanks so much for the suggestions. I put in the second one and it works for, well, the defaults as you would expect. Blocks like link, image, input just to name a few it doesn't add the attribute but those must be classified...
josefph
@kewilson could you help me adding another default trait in a specific component?