Created
August 22, 2018 10:12
-
-
Save ladislas/960163619103abfcd2fb0de53215648f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AppKit | |
let stringHTML = "<meta charset=\'utf-8\'><div style=\"color: rgb(160, 160, 160); font-family: Helvetica, Arial, sans-serif; font-size: 10px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">Ladislas de Toldi | cofounder & ceo @<span class=\"Apple-converted-space\"> </span><a href=\"http://leka.io\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">Leka Inc.</a></div><div style=\"color: rgb(160, 160, 160); font-family: Helvetica, Arial, sans-serif; font-size: 10px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">Techstars / Sprint Accelerator Class \'16</div><div style=\"color: rgb(160, 160, 160); font-family: Helvetica, Arial, sans-serif; font-size: 10px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">+33 628 323 707 |<span class=\"Apple-converted-space\"> </span><a href=\"https://twitter.com/ladisonline\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">@ladisonline</a></div><br style=\"color: rgb(160, 160, 160); font-family: Helvetica, Arial, sans-serif; font-size: 10px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;\"><div style=\"color: rgb(160, 160, 160); font-family: Helvetica, Arial, sans-serif; font-size: 10px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">Follow us:<span class=\"Apple-converted-space\"> </span><a href=\"https://www.facebook.com/weareleka\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">Facebook</a><span class=\"Apple-converted-space\"> </span>|<span class=\"Apple-converted-space\"> </span><a href=\"https://twitter.com/weareleka\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">Twitter</a><span class=\"Apple-converted-space\"> </span>|<span class=\"Apple-converted-space\"> </span><a href=\"https://www.instagram.com/weareleka/\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">Instagram</a><span class=\"Apple-converted-space\"> </span>|<span class=\"Apple-converted-space\"> </span><a href=\"https://angel.co/leka\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">Angel List</a></div><div style=\"color: rgb(160, 160, 160); font-family: Helvetica, Arial, sans-serif; font-size: 10px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;\">Learn more: <a href=\"http://get.leka.io\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">Indiegogo</a> | <a href=\"http://leka.io/pitch\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">Techstars Demo Day</a><span class=\"Apple-converted-space\"> </span>|<span class=\"Apple-converted-space\"> </span><a href=\"https://www.youtube.com/watch?v=49Zef_DB1mo\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">TEDxParis</a> | <a href=\"https://techcrunch.com/2016/05/03/leka-indiegogo/\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">TechCrunch</a><span class=\"Apple-converted-space\"> </span>|<span class=\"Apple-converted-space\"> </span><a href=\"http://www.bbc.com/news/technology-35204679\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">BBC</a> | <a href=\"http://mashable.com/2016/07/01/social-good-innovations-june-2016/#MwDWBUb2zGqc\" class=\"link\" style=\"color: rgb(75, 152, 209); text-decoration: none;\">Mashable</a></div>" | |
let pb = NSPasteboard.general | |
pb.declareTypes([NSPasteboard.PasteboardType.html], owner: nil) | |
pb.setString(stringHTML, forType: NSPasteboard.PasteboardType.html) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment