CMS (Grapes JS) plugins

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
vision
Posts: 23
Joined: 01 Dec 2022, 05:35

CMS (Grapes JS) plugins

Post by vision » 07 Jul 2023, 06:17

2022.10 branch.

Hello!

How can I add or enable image-editor plugin to GrapesJS?

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

Re: CMS (Grapes JS) plugins

Post by aimeos » 07 Jul 2023, 07:12

Check the GrapesJS documentation. The custom GrapesJS setup is located here and you can add custom code in the themes/admin/jqadm/custom.js of your own project-specific Aimeos extension:
https://github.com/aimeos/ai-cms-grapes ... /custom.js
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

vision
Posts: 23
Joined: 01 Dec 2022, 05:35

Re: CMS (Grapes JS) plugins

Post by vision » 07 Jul 2023, 08:21

aimeos wrote: 07 Jul 2023, 07:12 Check the GrapesJS documentation. The custom GrapesJS setup is located here and you can add custom code in the themes/admin/jqadm/custom.js of your own project-specific Aimeos extension:
https://github.com/aimeos/ai-cms-grapes ... /custom.js
Yes I did it in custom.js:

Code: Select all

 
...
GrapesJS: {
		config: {
			container: null,
			components: '',
			fromElement: false,
			showDevices: false,
			noticeOnUnload: false,
			height: 'calc(100vh - 10rem)',
			width: '100%',
			plugins: ['grapesjs-plugin-header', 'grapesjs-tui-image-editor'],
			pluginsOpts: {
				'grapesjs-table': {
					classTable: 'table',
					style: `
						.table .row {
							display: table-row;
						}
						.table .cell {
							width: auto; height: auto;
						}
					`,
					tableProps: {
						footer: false
					}
				},
                		'grapesjs-tui-image-editor': {
                    			config: {
                      				includeUI: {
                        				initMenu: 'filter',
                      				},
                    			},
                		}
	},
...
grapesjs.plugins.add('grapesjs-tui-image-editor', window['grapesjs-tui-image-editor'].default(editor, opts['grapesjs-tui-image-editor']));
...
But it doesn't work.

Should I add "grapesjs-tui-image-editor.min.js" code to grapes-ext.js?

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

Re: CMS (Grapes JS) plugins

Post by aimeos » 08 Jul 2023, 07:34

Sure, you need to add all necessary JS code.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply