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

Paste as HTML #31

Open
tcr opened this issue May 18, 2016 · 3 comments
Open

Paste as HTML #31

tcr opened this issue May 18, 2016 · 3 comments

Comments

@tcr
Copy link

tcr commented May 18, 2016

I want to request this feature, as well as track the steps toward making it happen!

Proposal: ctx.get_contents_by_type(ClipboardType::HTML), Text, Image, etc.

Windows:

OS X:

  • This stack overflow answer suggests stringForType can be used on this platform. Not sure how that differs yet.

Linux:

  • A little out of my depth (X11).
@aweinstock314
Copy link
Owner

X11's clipboard protocol does have content type negotiation (I think the relevant documentation is around here: https://tronche.com/gui/x/icccm/sec-2.html#s-2.6.2).

I'm not sure about a dedicated target for HTML (shouldn't that be a subset of UTF-8, and interpreted at a higher level than this?), but adding support for images is definitely a good idea.

@DoumanAsh
Copy link
Contributor

As far as i remember browsers might register HTML as format to clipboard.

@tcr
Copy link
Author

tcr commented Jul 22, 2016

I believe I can confirm. Browser copied HTML registers separate UTF-8 text content that strips HTML tags (as if you were to paste into notepad.exe) and HTML content that preserves tags (as if you were to paste into Word).

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

3 participants