[JSX] Can't replace with line break character in text area frame
Hi all,
I have a block of Area Text, no returns in it, and am trying to insert a line break into a line if the first character is a tilde (and delete the second character, a space. Below is my function. When I run it, it replaces the tilde with a hard return. Font is Arial Bold. Running on a Windows machine, AI 27.4.1. Any thoughts?
var seekFirstTilde = function(l /*Story.lines[i]*/) {
try {
var characs = l.characters;
var conts = characs[0].contents;
if (conts == "~") {
characs[1].remove();
characs[0].contents = "\n";
}
} catch(e) {}
//l.characters[idx-1].contents = "\n";
}
