Configure/Disable/Remove default Tiptap extensions
Hi,
I'd like to configure or totally remove some Tiptap extensions that come with the RichEditor.
ex: I want to disable highlighting, I'd like to customize some keyboard shortcuts, or want to remove any possibility of H1.
How would you do that, as the extensions are statically added in
forms/resources/js/components/rich-editor/extensions.js
?
Thanks,5 Replies
Do you mean within the toolbar? So just set which ones you want.
https://filamentphp.com/docs/4.x/forms/rich-editor#customizing-the-toolbar-buttons
Nope, I don't mean to hide the buttons, but disable or configure the features. It's not because you don't have a
B
button, that bold is disabled. You can paste it, you can cmd+B, or use markdown.Currently not possible, but it’s on my list to work on.
@awcodes Thanks for the reply. Would you want any help? If we discuss briefly about how to do it, I can submit a PR.
(IMO the easiest way would be to add the extensions depending on the toolbars buttons, but it may be seen as a breaking change)
If you have a solution that works, feel free to just submit it as a PR. No need to wait on me.