manogi / nova-tiptap

Laravel Nova Tiptap Field
MIT License
172 stars 57 forks source link

Add a method to disable link modes #40

Closed andrerei closed 2 years ago

andrerei commented 2 years ago

With the version 2 the option to upload a file and automatically set the link was added, but there is no option to disable this feature. This PR adds a method disableLinkModes() that hides the buttons url and file upload in the LinkButton component.

manogi commented 2 years ago

Hi @andrerei - could you please enable "edits by maintainers"?

There are some things that need to be done before merging this commit.

Thanks!

CleanShot 2021-08-29 at 11 20 42@2x

manogi commented 2 years ago

Hey there, I am already working with "imageSettings" and "fileSettings" methods to be a bit more flexible, so instead of your "disableLinkMode" method I now added a "linkSettings" method, where you can pass a boolean "withFileUpload" parameter. I also like the default to be that the File Upload is visible not hidden.

That is mainly what my changes to you PR are about. I will have to work over the Readme to add Explanations for this and also for a lot of other things, then I will tag a new version to include this change.

Thanks again for your PR.

andrerei commented 2 years ago

Awesome, I agree, it makes more sense like you did.

Thanks

manogi commented 2 years ago

This is now implemented in v2.1.0