roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Disable upload in markdown editor public page

Open Cannonb4ll opened this issue 3 years ago • 4 comments

As of now, it is possible to upload images in the markdown editor. We should make it configurable if this is allowed, or not.

On the markdown editor filament component:

->disableToolbarButtons(['attachFiles'])

Cannonb4ll avatar Jun 16 '22 07:06 Cannonb4ll

Hey @Cannonb4ll, My name is Saad, and I want to contribute to this Issue. It is my first issue on OpenSource, so Kindly bear with me on that part :) I have a good amount of experience with PHP/Laravel, so I am feeling comfortable with the codebase. (Btw I am new with filament and livewire)

~~I setup the project and did some research and found that I have to implement your suggested code in Filename: app\Http\Livewire\Modals\Item\CreateItemModal.php on Line#70 to disable it When Submitting Item.~~

~~But on which condition we want to remove this ability, can you guide me on this please. For example: Except admin no one should able to upload image, or something allowed to individual user.~~

I think I got it wrong, I just viewed Admin area, so there is a whole settings area, I believe we need an option there to allow/disallow upload in markdown. Can you let me know what we refer as 'public page', Is Item single page where other user(s) can view item and comment on it considered as a public page?

msaadm avatar Jun 18 '22 05:06 msaadm

Hey @Cannonb4ll, My name is Saad, and I want to contribute to this Issue. It is my first issue on OpenSource, so Kindly bear with me on that part :)

I have a good amount of experience with PHP/Laravel, so I am feeling comfortable with the codebase.

(Btw I am new with filament and livewire)

~~I setup the project and did some research and found that I have to implement your suggested code in

Filename: app\Http\Livewire\Modals\Item\CreateItemModal.php on Line#70 to disable it When Submitting Item.~~

~~But on which condition we want to remove this ability, can you guide me on this please. For example: Except admin no one should able to upload image, or something allowed to individual user.~~

I think I got it wrong, I just viewed Admin area, so there is a whole settings area, I believe we need an option there to allow/disallow upload in markdown. Can you let me know what we refer as 'public page', Is Item single page where other user(s) can view item and comment on it considered as a public page?

Hey Saad!

Great to hear you want to contribute🄳

I'm not sure what you mean with public page and all, but what we want with this is a setting (toggle) inside the settings page that blocks the upload of files inside the markdown editor.

Let me know if you have any other questions!

Cannonb4ll avatar Jun 18 '22 06:06 Cannonb4ll

I'm not sure what you mean with public page and all

It's inside the title of the issue "Disable upload in markdown editor public page"

Do we want to disable Upload of files inside all markdown editor instances found anywhere in the system by using that admin settings? or there may be any other case?

msaadm avatar Jun 18 '22 06:06 msaadm

@msaadm Yes correct, in the frontend (not admin) it should be possible to block image uploads (you can drag and drop images inside the editor).

There's 2 places where you can find the editor:

  1. Create item modal
  2. Comment on items

Cannonb4ll avatar Jun 20 '22 06:06 Cannonb4ll