Is (optionally) importing Sketch text layers as html layers as opposed to image ones doable or planned?
Pros: no artifacts, programmatically modifiable text etc.
Text areas are fairly easy to make. What types of features would you want for one? I could probably create a basic one for you.
I know. Still, what if you import those text layers from sketch as text layers having as style the one used in Sketch?
Perhaps I am not clear/specific enough.
Nope makes sense. But if you're going to modify them, why not just create them?
I just imagine it's a bit easier to export PNGs than all the text attributes, fonts, sizing, spacing, etc. It's doable but I bet you could make a tool that replaces a layer with a text layer pretty easily.
Yes, a .replaceWith method is what I had in mind but you won't have the styles (color, font family, size) to apply to the layer you replaced the image one with.
Right. I assume you'd know them if you designed them. If you used them a lot just store the values in a variable and reuse as needed.
Sure I could that. But old, busy people like me rarely have the time to do stuff the verbose way :)
Oh. I didn't realize you were old. My mistake. :|
36 here. ;)
38ish and counting :)
If I have some time in the next week I'll give this a go. I tend to design in code so I'm always writing verbose text pieces and I would actually like to simplify so it's not such a pain to add in text programmatically.
And here Jordan.
If you do make something, share it as a module. Could come in handy to the rest of us.
ps: maybe sketch text layer properties (such as style and content) are already stored in the imported struct somewhere. Or should be stored ;)
i have try , but i also can't found the way to change the value of text layer that import from sketch
Everything is doable, but this is hard. CSS properties can only do a subset of what Sketch can do so you have to come up with some sensible mappings for edge cases.