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

Add sourceEditorId property to clipboard input events. #17707

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Mati365
Copy link
Member

@Mati365 Mati365 commented Jan 2, 2025

Suggested merge commit message (convention)

Feature (clipboard): Add ability to detect paste events originating from editor. Closes #15935


Additional information

If content was pasted from another instance of the editor (or from an external resource) then isExternal property is true. Otherwise, it is false.

The main use case is we need to track if the user has pasted content from outside the editor so we can decide if the content needs to be modified before it’s added into CKEditor. See more #15935 (comment)

@Mati365 Mati365 requested review from niegowski and arkflpc January 2, 2025 13:56
@Mati365 Mati365 marked this pull request as draft January 7, 2025 09:41
@Mati365
Copy link
Member Author

Mati365 commented Jan 7, 2025

Solution needs to be changed, as it'll be better to make it more unified with drag & drop which uses mimetypes.

@Mati365 Mati365 changed the title Add isExternal flag to clipboard input events. Add sourceEditorId property to clipboard input events. Jan 7, 2025
@Mati365 Mati365 marked this pull request as ready for review January 7, 2025 11:46
@Mati365
Copy link
Member Author

Mati365 commented Jan 7, 2025

@niegowski I applied suggestion, mime type is now used to determine source editor.

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

Successfully merging this pull request may close these issues.

Add custom property for the content copied from the editor in the clipboard pipeline
1 participant