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

Feat: support for customize paste function #2156

Open
1 task done
CatKevin opened this issue Aug 27, 2024 · 8 comments
Open
1 task done

Feat: support for customize paste function #2156

CatKevin opened this issue Aug 27, 2024 · 8 comments
Labels
awaiting response Pending additional information or feedback from the issue creator enhancement New feature or request minor Minimal impact or cosmetic issue. Can be resolved at a later time without affecting overall function

Comments

@CatKevin
Copy link

Is there an existing issue for this?

Use case

I copied some content from another software that may contain some parsable emoji, but when I paste them into Quill Editor they can't parse the emoji using the custom parsing method.

Proposal

I found that there are onImagePaste and onGifPaste methods in QuillEditorConfigurations to handle the problem of pasting pictures. I wonder if there should be an onPaste method to handle the pasted content?

Future<String?> Function(Uint8List)? onImagePaste,
  Future<String?> Function(Uint8List)? onGifPaste,
@CatKevin CatKevin added the enhancement New feature or request label Aug 27, 2024
@EchoEllet
Copy link
Collaborator

EchoEllet commented Aug 28, 2024

Thank you for the report, do you want to customize how paste is handled in the editor in general? or do something when pasting an image?

@CatKevin
Copy link
Author

Thank you for the report, do you want to customize how paste is handled in the editor in general? or do something to paste an image?

Yes! I want to customize how paste is handled in the editor in general! Because I want to handle some specific encoding formats, such as email, url, emoji and other formats! So that we can make full use of the powerful functions of flutter quill! ! I Hope this function can be added! Thank you very much! !

@EchoEllet
Copy link
Collaborator

EchoEllet commented Sep 19, 2024

Once our clipboard platform implementation becomes stable (still in the early stage) and web common issues are fixed, we will start working on providing more API to customize the behavior and extend it further.

Related #2230

@CatHood0 CatHood0 added minor Minimal impact or cosmetic issue. Can be resolved at a later time without affecting overall function in progress This issue or feature is currently being worked on by someone. labels Sep 22, 2024
@EchoEllet EchoEllet removed the in progress This issue or feature is currently being worked on by someone. label Oct 16, 2024
@xalanq
Copy link

xalanq commented Dec 2, 2024

Any progress?

@EchoEllet
Copy link
Collaborator

Any progress?

Fixed in the pre-release version (11.0.0). See this comment. Not closed yet since I'm not entirely sure what is expected to be customized, and also it's a pre-release, expect some minor changes (will be documented in CHANGELOG.md).

@EchoEllet EchoEllet added the awaiting response Pending additional information or feedback from the issue creator label Dec 2, 2024
@EchoEllet
Copy link
Collaborator

@CatKevin Can you confirm whether the onDeltaPaste and onPlainTextPaste fixes the issue? #2350 (comment)

@CatKevin
Copy link
Author

CatKevin commented Dec 3, 2024 via email

@EchoEllet
Copy link
Collaborator

Thanks for the suggestion, see #2350 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Pending additional information or feedback from the issue creator enhancement New feature or request minor Minimal impact or cosmetic issue. Can be resolved at a later time without affecting overall function
Projects
None yet
Development

No branches or pull requests

4 participants