DigitalCloud / nova-page-builder-field

Nova Field allow you to design custom web pages using grapesjs.
32 stars 21 forks source link

Any support for plugins or customization to grapejs? #2

Open audetcameron opened 5 years ago

audetcameron commented 5 years ago

Howdy, is there any support for adding plugins or customization via a nova resource?

devmtm commented 5 years ago

Sorry, this functionality not supported yet. We will consider it in new release.

KnowledgeWanderer commented 5 years ago

Any news? I kinda need to include a BotMan component, that can be added by an user. Should I just modify the source code or what's the best way to go on this? No idea what a plugin actually is and how grapejs works.

alexsotir commented 5 years ago

I was able to use the grapesjs-custom-code plugin this way:

In vendor\digitalcloud\nova-page-builder-field\src\FieldServiceProvider.php

Nova::serving(function (ServingNova $event) { Nova::script('grapesjs-custom-code','https://unpkg.com/grapesjs-custom-code'); Nova::script('page-builder-field', __DIR__.'/../dist/js/field.js'); Nova::style('page-builder-field', __DIR__.'/../dist/css/field.css'); });

Then in vendor\digitalcloud\nova-page-builder-field\dist\field.js on line 54606:

mounted: function mounted() { this.editor = __WEBPACK_IMPORTED_MODULE_0_grapesjs___default.a.init({ container: '#editor', storageManager: { autoload: 0 }, width: '100%', plugins: ['grapesjs-custom-code', __WEBPACK_IMPORTED_MODULE_1_grapesjs_blocks_basic___default.a, ...