#2873July 3, 2020by RJCAM3 answers
Hi, I've noticed that some form components (like checkbox, radio and select) are not working when gjs is initialized with the Preset Webpage Plugin like in the example below: You can confirm this issue with the online Webpage Demo too https://grapesjs.com/demo.html Expected Behavior: can select all of them normally (o...
artf
Ah ok, now I got it. Yeah, forms plugin avoids some default input behavior, so it's intended. I agree that in the preview mode those behaviors could be re-enabled but I think that part might be integrated as a plugin (eg. by using event li...
RJCAM
Hum...ok, I'll try to do that, thanks for the help :+1:
artf
After rebuild the plugin the behavior works as expected, so problem resolved. Maybe there is a reason why I've done that?! 😅 Via plugin, you can simply extend those components and override handleClick function with your logic, where you p...
#2871July 2, 2020by acxvgalanov1 answer
GrapesJs version: 0.16.18; Steps to reproduce:Add Image block, set any image;Select the added block;Double click and change image to any other image with a different size and/or ratio. Expected result: The image is updated, the toolbar position and selection frame are updated. Actual result: The image is updated, the...
artf
Thanks for the report, it will be fixed in the next release
#2870July 1, 2020by alemencionesNo answers
I have encountered an error, when I drag and drop the mouse out of the component. The component is selected locked like the rest of the components. i have a video with the bug: https://recordit.co/rY5U9TmR7b
#2868July 1, 2020by BerkeAras2 answers
GrapesJS Version: 0.16.18 Client: Windows 10 1909; Brave Chromium (latest) Expected behavior: It should be possible to disable the asset-manager Current behavior: Asset manager is not disabled using this code: Full code: https://pastebin.berkearas.de/?44ff08e13bab068d#5AuNABBrvbkcYp8zh5r59jkmtqJQcsuTj5jSfykMVGxd Live...
artf
@mcottret is right but if you'd like also to disable the opening of the Asset Manager modal you can overwrite its command in this way:
mcottret
Hi @BerkeAras ! I don't think there's currently a way to completely disable the Asset Manager, you should however be able to disable adding images. Setting the upload option to false only disables uploading of images, but not base64 embedd...
#2867July 1, 2020by Lostpixelr1 answer
Hi, We are using some Twig template features in our grapesjs implementation. like: {% if variable == "value" %}<b>text</b>{% endif %} But due to the toHtml() function in src/dom_components/model/ComponentTextNode.js this gets converted into {% if variable == "e;value"e; %}<b>text</b>{% endif %} Is there an eas...
artf
Yeah sure, you can extend the textnode component and use your toHTML function
#2866July 1, 2020by sanjib001 answer
Hello @artf , For free dragging, we are using dragMode: 'translate'. When we're moving all components from bottom to top position, it remains some blank space at end of the page and browser shows scroll, although we don't have any content at end of the page. See screenshot - For better understanding, you can watch the...
artf
This is how translate mode works, the absolute mode doesn't leave any empty space
#2865July 1, 2020by ghost3 answers
this button is currently off by default. so you have to turn it on every time, which is not obvious to everyone. how do you make it active right away?
mcottret
Hi @Enmaboya ! Looking at the default Panels configuration, it should be active by default. If you have a custom panels configuration, you need to add the active: true property to the button's configuration (like here). Alternatively, you...
ghost
@mcottret thank you so much!
sdchamoli
In Angular myPlugin: any; this.myPlugin = editor => { editor.Panels.addPanel({ id: 'basic-actions', el: '.panel__basic-actions', buttons: [ { id: 'visibility', active: true, // active by default className: 'btn-toggle-borders', label: '<u>...
#2864July 1, 2020by fcnyp1 answer
I have a project that requires a form, currently using the form plugin, and each element of the form requires a name. While this is a trait, is it possible to require a trait and check all nodes to determine if they meet their requirement? Following my example one would create a form where the nodes have a required tr...
artf
What you see in the documentation it's just about the required attribute (eg. <input ... required/>), so nothing blocks the user from storing the template. In your case, you can create a kind of check before storing which queries all the f...
#2863June 30, 2020by mcottret2 answers
Hello again :) Our team might have found a bug while using the Layer Manager API: every call to component.viewLayer.isVisible() seems to always return true, regardless of their actual state. Steps to reproduce:Open the demoSwitch to the layers panelClick on the eye icon to hide the "Body" layerOpen the consoleExecutin...
artf
Yeah, you're totally right, the PR is welcome :)
mcottret
Great ! #2879 opened.
#2862June 29, 2020by Lerdouille3 answers
Hi, i succeed to create a new type containing a clickable image. But unfortunaltely, the new custom type isn't recognize by the HTML parser on import. Here is my new type source code : editor.DomComponents.addType('imagelink', { isComponent: el => { if (el.tagName === 'DIV' && (typeof el.classList !== 'undefined' && e...
Lerdouille
Hi, for the record, when i try to change the isComponent return, with a type defined in a plugin like this : isComponent: el => { if (el.tagName === 'DIV' && (typeof el.classList !== 'undefined' && el.classList.contains('imagelink-class'))...
Lerdouille
Another curiosity which might be logical... If i tried to put a exotic isComponent function like this : if (el.tagName === 'ABCDE') { return { type: 'imagelink' }; } And when i try to import this html text : <abcde>test</abcde> The plugin...
artf
I think you're missing the point of components. You have a custom one (imagelink) and then an inner one (img), so the editor shows it, so I see no issues here. To see the traits from the custom component you have to select it and it has no...