[QUESTIONS] images inside link block not responsive
Hi, I know I can insert a URL for images via link block. My question is images inside link block is not responsive automatically.
artf
Add the CSS you need to fix that
Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.
3464 issues found
Hi, I know I can insert a URL for images via link block. My question is images inside link block is not responsive automatically.
artf
Add the CSS you need to fix that
Hi, I'm trying to import utility classes into grapes js. My issue is that grapes remove them if they are not use by an element in the canvas. I'm building a custom panel to link to my CSS variables (CSS custom properties) to manage this classes in grapes. How can I import my CSS and keep all the classes? I have create...
Ju99ernaut
grapesJS does not deal with css directly it first parses it into a CSSOM and uses that in the editor so a class will not show up in the code preview unless there is a component in the editor canvas using it. Your classes will be imported d...
Ju99ernaut
You could load the stylesheet externally during init and remove it from the index.html altogether You can also check the SelectorManager and CssComposer api reference
vinceumo
Thanks @Ju99ernaut, do you know if there is anyway to add some css and make it available in the canvas and as well have it in the export?
Hello, I managed to install each plugin separately and run them. How do I combine them? And if you can please give me relatively detailed instructions because I saw some solutions here like "add ckeditor library" and I am not sure how to do it. Thanks
Ju99ernaut
I guess you could bundle those plugins into a single plugin using grapesjs-cli. For reference check out grapesjs-preset-webpage index.js file.
Can I customize the asset image click event, so that I can stop auto updating image source on a single click. Is there any way to say the target.set() to the default source of an image component? Iam customizing asset image onclicking property. What's happening by default grapesJS is onclicking the image from an asset...
artf
Refer to this part https://grapesjs.com/docs/modules/Assets.html#extend-asset-types
Hello, i would like to extend the image type with some options, specially with a redirect option on click. I tried this solution after the editor initialization (i precise that i work in full javascript and non Node.js environment) : editor.DomComponents.addType('image', { isComponent: el => el.tagName == 'img', model...
Lerdouille
Hi again, here is the final solution to create a a href image : Now i have to found how to check the URL integrity when you want to update the href variable Best regards
felipesotero
I have the same need in my project. I tried creating a block, but I couldn't get the initial popup to "pop". I tried creating a component with a plugin, but there's too much work that I can't understand how it can connect to each other. An...
artf
You've added this listener change:url but the name of the trait is name: 'href', so just change it with change:href
Hi, when provider change I get the "this.model is undefined" error in updateProvider function. This screenshot is form https://grapesjs.com/demo.html, just add the video component and change the provider.
artf
relates to this https://github.com/artf/grapesjs/issues/2773
Good morning, please I need help to create templates and then load them, I really cannot do anything, I want to be able to save templates, later load them, I have been days without trying, I am new to programming I have followed everything to the letter , and really the only thing that I am missing are the templates p...
Ju99ernaut
At the bare minimum you need commands for saving the templates and opening a modal that shows the saved templates, and to handle loading a template onto the editor. To save a template using local storage you can use something like To open...
@artf When I click on the devices(tablet, mobile), the size of the canvas is not updated But it Worked in Version 0.15.x and lower.
cdespinosaagmx
I have the same issue
kuhelbeher
I had the same issue after grapejs update. In my case it turned out that I was using old version of css file: https://unpkg.com/[email protected]/dist/css/grapes.min.css I updated it to use version as grapesjs and it solved my problem. Try...
alitorki2651
I have the same issue @artf
Hi I'm trying to add color to built-in rte for background and foreground, but after unfocusing an element - style prop resets. Here is an example : https://jsfiddle.net/2s3vhygn/ Looks like i need to update an model and set up styles on it. Trying to update model using this code: But inserted span isn't selectable. So...
artf
@iamDreamcode to make that element selectable you should force the sync of the text component https://jsfiddle.net/xhp7k1bs/
Hello there, I am trying to use GrapesJS for template customization for my end users, but ran in the following problem: There is no documented way which I can replace all of the content with something like a function. I tried redirecting, but that, well... redirects. What I have: -An exact copy of the demo page (I cou...
artf
Well a lot of things depend on your backend and there I can't help you, but if you need to replace the canvas with a new template you would use something like this