#Install a resize image extension in tiptap richeditor
8 messages · Page 1 of 1 (latest)
I tried to install the resize-image extension without success. Has anyone succeeded and have any tips? Thanks
I Alexandre. I'm also interested in this plugin. Have you found a way to install it?
hi Marco, no. Still trying.
Hey guys, im on the same boat. I'll post my journey here maybe it can help.
i followed the guide and created a build script to build the following:
import ImageResize from 'tiptap-extension-resize-image';
export default ImageResize;
this got build just fine. Then i registered it as
FilamentAsset::register([
Js::make('rich-content-plugins/image-resize', __DIR__ . '/../../resources/js/dist/filament/rich-content-plugins/image-resize.js')->loadedOnRequest(),
]);```
then published using:
php artisan filament:assets
all good so far. i also verified the file gets loaded just fine after i registered it in `getTipTapJsExtensions`
the stage im stuck is where i need to actually register it on `getTipTapPhpExtensions`
it would be nice if we have a documentation on how to do these things or even a nudge to the right direction!
@ember urchin i think you are the most experienced in this 🙂
I wouldn’t think an image resize would need a php extension since it’s only happening in the context of the editor.
Any console errors?
oh ok. so no need to return anything on the getTipTapPhpExtensions, thanks!
Regarding errors, no console errors, no nothing. i dont know if im missing anything else or if this resize extension does not work with filament.
i'm using this:
https://github.com/bae-sh/tiptap-extension-resize-image
it does say that "stability in VanillaJS may not be guaranteed"