hello ,
since i'm writing a plugin which behave like your Sketch-style-Inventory...
i looked at your code and see you're facing same problem as me !
this command texte.style().textStyle().setAttributes(a.style().textStyle().attributes());
doesn't do his job ! at least it styles the textLayer but does nor reference it as a textStyle ( not appearing in the textStyle menu ).
are you aware of something that could register the textStyle as a real textStyle ? because i'm stuck in there .
i managed to create mocks in a hackish way but i'm not satisfied with this.
ex https://github.com/postite/sketchApi/blob/sketch3/exp/ExportStyledText.hx#L84
sorry to bother if you do not consider this as a issue for your current script.
cheers
hello , since i'm writing a plugin which behave like your Sketch-style-Inventory... i looked at your code and see you're facing same problem as me ! this command texte.style().textStyle().setAttributes(a.style().textStyle().attributes()); doesn't do his job ! at least it styles the textLayer but does nor reference it as a textStyle ( not appearing in the textStyle menu ). are you aware of something that could register the textStyle as a real textStyle ? because i'm stuck in there . i managed to create mocks in a hackish way but i'm not satisfied with this. ex https://github.com/postite/sketchApi/blob/sketch3/exp/ExportStyledText.hx#L84
sorry to bother if you do not consider this as a issue for your current script. cheers