Skip to content

Instantly share code, notes, and snippets.

@sonburn
Created December 21, 2017 21:11
Show Gist options
  • Select an option

  • Save sonburn/49f954d7c3e37ae8499b2d5711e9adce to your computer and use it in GitHub Desktop.

Select an option

Save sonburn/49f954d7c3e37ae8499b2d5711e9adce to your computer and use it in GitHub Desktop.
var layer = context.selection[0],
attributes = layer.attributedString().treeAsDictionary().value.attributes;
attributes.forEach(function(attr) {
log("Text:" + attr.text);
log("Color:" + attr.MSAttributedStringColorAttribute.value);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment