Features in GrapeJS

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
karpati
Posts: 14
Joined: 08 Feb 2022, 20:42

Features in GrapeJS

Post by karpati » 17 Feb 2022, 15:08

Hello!

Is it possible to turn on features in GrapeJS admin that I see on grapejs.com?
E.g.:
The most important are:
- Style manager tab: to add a class to an element
- Source code

Useful:
- Fullscreen
- Layer manager tab: view all elements in a tree structure

Thank you!

User avatar
aimeos
Administrator
Posts: 8012
Joined: 01 Jan 1970, 00:00

Re: Features in GrapeJS

Post by aimeos » 18 Feb 2022, 08:23

karpati wrote: 17 Feb 2022, 15:08 - Style manager tab: to add a class to an element
- Layer manager tab: view all elements in a tree structure
- Source code
Yes, you can add custom code to the GrapesJS configuration object where you can add the necessary settings here:
https://github.com/aimeos/ai-cms-grapes ... s#L79-L204

In your admin/jqadm/themes/custom.js of your own extension, use:

Code: Select all

Aimeos.CMSContent.GrapesJS.panels[4] = {
			id: 'views',
			buttons  : [{
				id: 'open-sm',
				command: 'open-sm',
				className: 'fa fa-paint-brush',
			},{
				id: 'open-tm',
				command: 'open-tm',
				className: 'fa fa-cog',
			},{
				id: 'open-layers',
				command: 'open-layers',
				className: 'fa fa-bars',
			},{
				id: 'open-blocks',
				command: 'open-blocks',
				className: 'fa fa-th-large',
			}],
		};
karpati wrote: 17 Feb 2022, 15:08 - Fullscreen
This one is already available.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

karpati
Posts: 14
Joined: 08 Feb 2022, 20:42

Re: Features in GrapeJS

Post by karpati » 19 Feb 2022, 08:33

It works, thank you very much for your help.

I couldn't find the file "admin/jqadm/themes/custom.js" (and it didn't work when I put it there)
so I copied the code to the file "admin/jqadm /js/custom.js".
And it needed index 3 instead of index 4 because "impexp" is commented out by default.
Aimeos.CMSContent.GrapesJS.panels [3]

Thanks

User avatar
aimeos
Administrator
Posts: 8012
Joined: 01 Jan 1970, 00:00

Re: Features in GrapeJS

Post by aimeos » 20 Feb 2022, 22:29

It's important that you add it to your own Aimeos extension you've created for your project. Otherwise, it will be overwritten as soon as a new aimeos/ai-admin-jqadm package is available and you run "composer up".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply