Clipboard API
acketon opened this issue · comments
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
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).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];
}
You can try using https://github.com/styfle/copee