filament-editorjs icon indicating copy to clipboard operation
filament-editorjs copied to clipboard

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

Open tonypartridger opened this issue 3 years ago • 2 comments

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

tonypartridger avatar Feb 03 '23 14:02 tonypartridger

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 avatar Mar 25 '24 02:03 adampatterson

@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

adampatterson avatar Apr 07 '24 20:04 adampatterson