Rich editor throws js error if using a custom plugin
I followed the documentation to extend the rich editor.
I created a LinkRichContentPlugin
JS
Appserviceprovider
Versions used:
Filament: v4.1.0
Laravel: v12.32.5
Error given:

7 Replies
This is a known issue. It’s a bug in the merging logic. Just haven’t had time to look into it further yet.
Oh yeah! I remember talking about this in the offtopic channel, so what do you suggest to bypass this? Extend the richeditor class and the js files and modify them directly. Because I just need the Link config to openOnClick xD and in the rich-editor.js or extensions.js you guys have it on false
That would probably be the only way at the moment. But I would hate for you to do that. Would probably be better time spent to PR a fix for it in core.
The problem is in extension.js. The merging is a shallow compare and the core link and your link don’t have the same object representation so, the custom one doesn’t remove the core one from the array.
I was getting around it in tiptap editor plugin by keying the extensions in the array.
I can give it a try
Do what works for you though. Not trying to get free work out of you for core. 😂
tomorrow I'll try to understand how that works and try to PR because if it helps me surely helps a lot of people. If my boss starts nagging me, well I'll do it the hard way xD