Copy link to clipboard
Copied
Hi,
How to perform find and replace text in illustrator using javascript?
any predefined functions in illustrator like in indesign..
app.findTextPreferences.findWhat = "XXX";
app.changeTextPreferences.changeTo = "YYY";
app.activeDocument.changeText();
for now I have achieved find/replace by using iterating all textFrames and replace the contents
but it is not a better solution
pls help..
Thanks
Copy link to clipboard
Copied
I don't think there is any other way.
Copy link to clipboard
Copied
Hi, new poster here. While we're on the subject, I was using the Find/Replace tool to change a return/linebreak to this: tab/linebreak/tab, but it seems you can't copy and paste line breaks into the 'Find...' or 'Replace...' fields.
It seems the tool will only recognise hard line breaks ('shift/return' as opposed to just 'return') but it is VITAL I'm able to identify plain line breaks and not hard line breaks - any way of doing this via key commands? The ^p only seems to recognise hard line breaks, not soft ones. Also, if there is any way of doing a key command for the 'tab' too that would be fab.
Currently using AI late 2017, on a Windows 7 PC.
Many thanks for any help - hope any of you are able to shed light on this issue thanks.