Created
July 15, 2015 18:02
-
-
Save tarngerine/33ab78bf9bc414514034 to your computer and use it in GitHub Desktop.
Force New Line Behavior Sketch Plugin
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
// Paste this into Plugins > Run Custom Plugin... | |
var allLayers = context.document.currentPage().children(); | |
for(var i = 0; i < allLayers.count(); i++) { | |
if(allLayers[i].class() == 'MSTextLayer') { | |
// Set New Line Behavior | |
allLayers[i].setPrimitiveUsesNewLineSpacingBehaviour(true); | |
// Reset string value to trigger refresh | |
allLayers[i].setStringValue(allLayers[i].stringValue()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment