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

Clipboard API #7

Open
acketon opened this issue Aug 1, 2014 · 2 comments
Open

Clipboard API #7

acketon opened this issue Aug 1, 2014 · 2 comments
Labels

Comments

@acketon
Copy link

acketon commented Aug 1, 2014

Could you add a simple copy to clipboard api? Since all of the content is in a web view I can't find a way to use Javascript to copy text/etc to the clipboard.

Node Webkit has a clipboard api that seems to work well:
https://github.com/rogerwang/node-webkit/wiki/Clipboard

https://github.com/rogerwang/node-webkit/tree/897288eac99ca9895bf209367a9526be67579f1f/src/api/clipboard

Thanks

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3435202-clipboard-api?utm_campaign=plugin&utm_content=tracker%2F899498&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F899498&utm_medium=issues&utm_source=github).
@xhacker xhacker added the feature label Aug 1, 2014
@acketon
Copy link
Author

acketon commented Aug 2, 2014

I added this pasteboard example I found on stack overflow, but I don't really understand it. It works and I tied it to a mw.copyString() that I based off the openURL() function

-(void)copyString:(NSString*)str
{
NSPasteboard *pb = [NSPasteboard generalPasteboard];
NSArray *types = [NSArray arrayWithObjects:NSStringPboardType, nil];
[pb declareTypes:types owner:self];
[pb setString: str forType:NSStringPboardType];
}

@xhacker xhacker self-assigned this Sep 22, 2014
@xhacker xhacker removed their assignment Jul 3, 2016
@styfle
Copy link

styfle commented Jun 6, 2018

You can try using https://github.com/styfle/copee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants