Script for detecting white spaces in text layer and inserting new line
I have several different psd files of various names, some with or without a space between words.
What I'm attempting to do is add a new text layer with text equal to the file name. I've found a script that accomplishes this (thanks Julieanne Kost).
However, if the file name contains multiple words with spaces (example: "Eat This Apple"), I would like to display the text as 3 separate lines, center-aligned.
Is there a way to accomplish this? Maybe by detecting white space in the given text layer, and inserting a new break line at every instance?
Similarly, looking for a way also remove spaces in a different case.
Thanks!
