rahmanramsi / filament-editorjs

MIT License
70 stars 24 forks source link

How do we add plugins? Can we define them somewhere? #15

Open tonypartridger opened 1 year ago

tonypartridger commented 1 year ago

EditorJS supports whole range of very useful plugins beyond the defaults, how can we harness them?

adampatterson commented 3 months ago

I forked the code and added some but I'm having trouble compiling the assets since it's looking for postcss loader that would be in the main laravel root.

adampatterson commented 2 months ago

@rahmanramsi Do you have any directions on how custom plugins could be added?

Installing and updating the JS is no problem but building seems to be a bit tricky.

I have a vanilla install of Laravel 11 + Filament 3 and if I npm i in the composer folder and then npm run prod

ERROR in ./resources/css/editor.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error [ERR_REQUIRE_ESM]: require() of ES Module /filament/postcss.config.js from /filament/vendor/rahmanramsi/filament-editorjs/node_modules/cosmiconfig/dist/loaders.js not supported.

It might be Mix vs Vite