Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to diasable "paste image" functionnality in custom RichtexField ? #6995

Open
Gilbertdelyon opened this issue May 7, 2024 · 1 comment

Comments

@Gilbertdelyon
Copy link

I a custom module I have a form with RichtextField thanks to this piece of code

$form->field($model, 'mytext')->widget(RichTextField::class, [ 'pluginOptions' => ['maxHeight' => '600px', 'id'=>'mytext','exclude' => ['oembed', 'upload'] ]]);

It works!

Thanks to 'exclude' => ['oembed', 'upload'] the upload button it not in the editor menu,
but it is still possible to insert an image by way of a simple copy/paste.

Question: Is there a simple way to configure this specific RichtexField so that the user cannot insert any image at all ?

@luke-
Copy link
Contributor

luke- commented May 7, 2024

Hmm, I don't think there is currently an option for this.

Maybe you could create an issue https://github.com/humhub/humhub-prosemirror here, that when “Exclude” contains “upload”, the copy&paste functionality is also deactivated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants