Add a dashed underline to a text layer
✓ Published0🌍 Public
KKevinGutowski
Last edited Oct 25, 2019
Created on Oct 25, 2019
This example demonstrates how to apply a dashed underline to text layers in a Sketch document using the `sketch` JavaScript library. It first retrieves the selected document and filters the selected layers to only include those of type "Text". For each text layer, the script uses the `addAttribute_value` method to set the underline style to a combination of single and dot pattern, referencing the `NSUnderlineStyleSingle` and `NSUnderlineStylePatternDot` constants. The code comments list alternative underline styles and patterns available for modification.
AI-generated description