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

Disabled Ctrl+V Image base 64 #4634

Open
3 tasks done
renanfrancisodasilva opened this issue Apr 30, 2024 · 1 comment
Open
3 tasks done

Disabled Ctrl+V Image base 64 #4634

renanfrancisodasilva opened this issue Apr 30, 2024 · 1 comment

Comments

@renanfrancisodasilva
Copy link

Checklist

  • I've searched through the plugins to make sure this feature isn't already available, or think it shouldn't require a plugin.
  • I've searched through the current issues to make sure this feature hasn't been requested already.
  • I agree to follow the Code of Conduct that this project adheres to.

Motivation

It is not possible to prevent the user from copying an external image and pasting it into the Textarea, generating base64

Suggested solution

Possibility to disable the following events:
insertImage,
insertImagesAsDataURL,
insertImagesOrCallback

When removing the class from their key, the behavior no longer occurs

Alternatives considered

Here we remove the keys from the codes, but it could be an option/configuration

@DennisSuitters
Copy link
Member

Summernote hooks into the Browsers native Javascript functionality to perform insertion tasks. I'm not sure, but I think if the option (if there is one) to prevent disabling image insertion, which should also cover drag/drop and copy/paste which invokes the Summernote functionality checks if it's enabled or disabled prevents or allows the functionality to happen, or stop the native browser function from happening. If you want to make the changes if you're able, I'll test and merge. However, I'm currently working on a Potato Harvester, 10hrs a day most days at the moment, so I can't promise when I can test and merge.

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