#1476October 4, 2018by detectedstealth2 answers
Using the demo web preset template as a starting point, I noticed the remove asset button doesn't show up in the UI. Viewing source shows the button. It there some other setting that needs to be enabled for the remove button to be functioning?
artf
Probably related to some style of the preset, please open the issue in the relative repository
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.
#1475October 2, 2018by shlomoko3 answers
Hi, I am trying to add a filter property to Styles. The problem that I am having is that the property demands 2 arguments: 1. The type of filter 2. The strength. e.g filter: blur(10%). the problem I am having is that when added to the css file I am getting- filter: blur 10%. I understand that I should be using propert...
artf
Hi @shlomoko to make the filter work properly via stack type you have to add a custom style manager type, because, as you already noticed, you have to deal with dynamic stuff (eg. functionName). Unfortunately, we didn't document that part...
artf
Hi @shlomoko I've created a plugin with the filter type input https://github.com/artf/grapesjs-style-filter You can use it with the latest release https://github.com/artf/grapesjs/releases/tag/v0.14.40
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.
#1474October 2, 2018by keithstric3 answers
This is for version 0.14.33. After initializing the canvas and selecting an element 3 network requests are generated to the following: https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.14.33/fonts/fontawesome-webfont.woff2?v=4.7.0https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.14.33/fonts/fontawesome-webfont.woff?v=...
artf
cdnjs doesn't store fontawesome in grapesjs (but grapesjs' CSS tries to load them). The solution proposed by @detectedstealth it's for the canvas CSS so it has nothing to do with this editor CSS issue So try to include fontawesome manually...
detectedstealth
@keithstric for me to get font awesome to work in the editor I needed to add: To the init({}). Have you tried that?
keithstric
Thank you for your response. So, gave that a go, I added: canvas: { styles: ['https://cdnjs.cloudflare.com/ajax/libs/grapesjs/0.14.33/fonts/fontawesome-webfont.woff2?v=4.7.0'] }, to my init options, but still get the same behavior. I tried...
#1473October 2, 2018by detectedstealth2 answers
Comments in canvas/config.js state the external styles are added to the head of the iframe however the code in view/CanvasView.js actually appends the CSS to the body of the iframe. Expect it to work how the external scripts do where they are appended to the head correctly.
artf
Should not cause any issue as being the first element inserted but for the sake of completeness we gonna move it inside the head element
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.
#1472October 2, 2018by detectedstealth3 answers
Wondering if there is a limitation or is it actually possible to create a block that allows the user of the editor to write custom javascript code as they are building the template? For example drag and drop a custom code block and write the javascript in it? Example: I created a link and wanted to capture the click e...
cjpollard
Try grapesjs.init({ allowScripts: 1, ... });
cjpollard
That just means you won't see the code, but you get something to see and click on to edit it. The JavaScript itself is there and works just fine.
cjpollard
https://github.com/artf/grapesjs-custom-code
#1471October 1, 2018by alfaalex813 answers
Hi! I use this code to add a new block: blockManager.add("image", { label: 'Image', category: 'Basic', attributes: { class: "gjs-fonts gjs-f-image" }, content: { style: { color: "black" }, type: "image", activeOnRender: 1, }, }); How can add a custom class to the img tag when i drop into canvas? Thanks.
arthuralmeidap
@alfaalex81 For the content object, you can add a new index called classes. This index needs to be an array of classes, which will be applied to the new Image block; Final code:
alfaalex81
Awesome! I have another question for the same argument. I need to create a custom block with an image inside, for example: <div> <ul> <li> <div><a href="#link"><img src="" alt="Title Image" /></a></div> <a href="#link" >Title</a> </li> </u...
arthuralmeidap
This is not the current grapesjs's behavior. the AssetManager only opens if you dropping directly am img block. You must have to select the img block within your custom block and execute a code like that:
#1470September 28, 2018by mgotovkin-plana3 answers
Hi, I am working on a project with Angular 6 and I am investigating a memory leak after destroying the editor on _previousAttributes and possibly coming from underscore bind function So,Why not using native bind and other functions?I figure out that there are couple of underscore libraries inside grapes.js file 1.8.3...
artf
I apologize but this is not yet solved. I've discovered that after removing the component the reference to its DOM was still there. Unfortunately, removing the reference brokes the Sorter, so I have to figure out how to refactor it properly
artf
Just a quick update, I'm working on this issue here, so far memory leaks with components seems to be fixed, now I'm trying to solve the one with destroying part (a bit longer as I have to isolate each module, a bit of mess in each of them....
artf
@BrainMaxxx would be glad to have a help on this :)
#1469September 27, 2018by Deepak8132 answers
Hi @artf, Is there any common method where we can know something updated on canvas. We want to create a custom undo manager and also want to give auto save option if any change hapend in the canvas like style update, clone, delete, new element dragged in the canvas. Any help would be appreciated. Thank you
artf
Start from checking out available events https://grapesjs.com/docs/api/editor.html#available-events
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.
#1468September 27, 2018by kornflex3 answers
Hello, I can't translate asset manager title to french. Example : assetManager: { storageType: '', storeOnChange: true, storeAfterUpload: true, modalTitle: 'Gestion des images', uploadText: 'Glisser - déposer les images ici <br><br> <i>(2Mo max par image)</i>', addBtnText: 'Ajouter', ... } modalTitle is not changed, i...
artf
I can't reproduce it, provide a live demo please
no-response[bot]
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...
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.
#1467September 27, 2018by kornflex1 answer
Hello, When I upload an image file with drag and drop in the specific zone, the image is stored on my server twice and shwon twice on the uploaded image list. Checking with firebug, I can see two requests. But, if I select an image using windows explorer ( after clicking on drop zone) or if I drag/drop the image on th...
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.