Open acketon opened 10 years ago
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
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