Skip to content

Copy PNG and SVG to the clipboard #3771

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

Merged
merged 1 commit into from
Mar 5, 2025
Merged

Copy PNG and SVG to the clipboard #3771

merged 1 commit into from
Mar 5, 2025

Conversation

amolenaar
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

Diagram data can't be copied to other apps.

Issue Number: #3664

What is the new behavior?

Apart from the (internal) copy buffer, also provide PNG and SVG images, so diagrams can be copied in other apps.

Other information

  • Paste function is now async/await instead of callbacks.

@github-actions github-actions bot added the python Pull requests that update Python code label Feb 22, 2025
@amolenaar amolenaar requested a review from danyeaw February 22, 2025 21:45
paste function is now async/await instead of callbacks.
@danyeaw danyeaw added feature A new feature and removed python Pull requests that update Python code labels Mar 2, 2025
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @amolenaar, this looks really good!


with Transaction(self.event_manager):
for i in list(items):
i.unlink()

def paste_link(self, view):
self._paste(view, paste_link)
self.create_background_task(self._paste(view, paste_link))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea to use asyncio for this!

@danyeaw danyeaw merged commit 9ad5155 into main Mar 5, 2025
24 checks passed
@danyeaw danyeaw deleted the copy-images branch March 5, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants