Following the release of my Combine Textfields extension for Flash, I’ve put together a similar extension for Adobe Illustrator. This extension installs a script that will merge text (including text on a path) into one text object, while retaining the style attributes of the individual pieces, including character styles as well as paragraph styles (if the separator includes a return character).
Anyone who’s tried to edit text from a PDF opened in Illustrator knows how frustrating it can be to make simple text edits when the text is broken up. This extension reduces that headache.
Special thanks to David Van Brink for posting the Omino Dialog Maker. His time-saving code was used to produce the dialog box in this extension.
Download Options
- MergeText_AI.jsx (CS2 & up, can be used for CC 2015 & newer)
- MergeText_AI_CS1.js (CS1)
- MergeText_AI_en.mxp (CS4 to CS6 – US English)
- MergeText_AI.zxp (CC prior to 2015 – US English)
Installation Instructions
JSX or JS file:
- Place the MergeText_AI.jsx (or MergeText_AI_CS.js) into the Scripts directory within your Illustrator application directory:
Windows > C:\Program Files\Adobe\Adobe Illustrator {version}\Presets\en_US\Scripts
Mac OS X > Applications/Adobe Illustrator {version}/Presets/Scripts
Note: In CS4, the directory path will include a region directory (e.g. Adobe Illustrator CS4/Presets/en_US/Scripts).
MXP file or ZXP file (CS4 or newer):
- Double-click on the mxp file to install using Adobe Extension Manager.
Note: Adobe has abandoned Adobe Extension Manager as of CC 2015, even though it’s still installed. You can use the JSX file in that case (installation instructions above).
Update Oct. 2023
You also can try using one of these non-Adobe-built Extension Managers to install the .zxp file.
Usage
In Adobe Illustrator, select the text the you want to merge together and go to File > Scripts > MergeText_AI. If you’re using Illustrator CS3 or CS4, you will be prompted with a dialog box where you can choose your sorting orientation and a custom separator. If you’re using a version earlier than CS3, you will not be prompted with a dialog; the script will run using the default settings sorting topmost, then leftmost, with a separator of “[><]”. You can then run a Find and Replace and replace the separator with the characters of your choice.
Get updates from Ajar Productions
Sign up today and get the InDesign Split Text premium extension for free!
Great script but running into an issue where it won’t keep the different font types and sizes. Am I doing something wrong? Each “set” has about 3 different fonts and when merged, they all become the first font selected.
Hi Ellie,
If your items have paragraph styling, then the separate needs to include a hard return for the paragraph styling to be maintained.
For PC no x64 support?
Hi Penio,
Use the install instructions for the JSX file. It should work fine.
I use your script quite often, and of course when Creative Suite upgraded to 2015 its “no longer compatible”. It throws up an error that “This extension can not be installed, it requires Illustrator version 14 or greater.”
When do you think you may be able to update it?
Hi Patrick,
With the CC 2015 update, Adobe broke the installation of extensions with Extension Manager.
Try manually installing the .jsx file with the manual install process above. That should work.
That worked. Thanks for the info.
This plug in worked great until CC 2015. Now I am trying to use it to merge text from a pdf converted to Illustrator, and it gives me the message: “No textfields selected.” It still works fine on NEW text I created as a test, but it won’t merge pdf-originated text. Any ideas what is happening? Thanks for any help you can offer.
Did you make sure the text objects were not in a group? I haven’t tested it in CC 2015, but I know I always got that error before when the text objects were grouped (which usually happens with PDFs).
Thanks Leigh. Yep, I made sure the text was ungrouped and it still didn’t work.
Solved! I had to ungroup the text multiple MORE times than I already had. Thanks for the help…. you were correct!
Hi,
I am having same problem but I don’t understand how you do this. Can you please explain a little more. I have removed layers from within the drop down group. Yet still getting same error. What else do I need to do please?
I am having the same problem. But I can not fix. I tried removing from drop down group. Still same problem.
Can you please explain how you removed from group or how you fixed. I just can not work it out.
I really appreciate this script! I’m starting to use it more and more. I was wondering if there’s a way simplify it a little without the dialog box and leave the settings always with top and \r ?
I’m trying to run it inside an action without any interruptions to automate things a bit more.
Hi Daymon,
Glad to hear that the script is helping you! Yes, you can download the .js file, which does not use a dialog and open it in a text editor to set the values that you’d like to use.
Nice script, thx. However, separator should be also a button option. (Maybe Return, Tab and Other), so it would be faster.
Please i want your help please!
i want to Select the “left” option as default, after that i want the script run automaticaly without pressing ok in the UI menu, i want just to click and excute it automaticaly without the reste of the other functions! thank you so much in advanc
Hi Zakaria,
Look in the Older Comments for ways to customize.
the .js file give me un erreur at line 68 ==>
newOminoDialog it’s not a function, i use illustrator cs5, thank you for your replay and your time 🙂
Change these two lines:
if(aiversion >= minimumversion) runDialog();
else run();
to:
run();
thank y ou Justin !
big thanks for you, thank you so much for your time, you are perfect! thank you so much again 🙂
Thank you for this time saver!
This worked for me on Adobe CC 2017 on a mac. Worked wonders going from a PDF or word DOC into AI. such a huge time saver. If you’re ever in NJ I will buy you a beer good sir.
Glad to hear it, Jay. 🙂
Nice script saved me a lot of C&P-ing! Many many thanks!
Any reason the separator couldn’t be radio buttons? Then I could be EVEN LAZIER! 🙂
Good note, Philip. That would be challenging! 😉
Great tool! Is there a way to make the default separator a space?
Yes, you can edit the variables in the file.
Open the file in a text editor, then search for the current default separator, replace it, and save.
God bless you for this!!
This script is making my life so much easier. I am working with files generated by a graphing software which spits out every letter of text as an individual text object, and this is much quicker than replacing by hand.
Scientists using Illustrator to beautify graphs generated in Origin or Python – this is your friend.
Great tool!
Tks a lot…
Great script! Works perfectly with Illustrator 2021 Mac.
Thank you
-Don
Thank you for this great script.
I have 0% experience in java. But I need this great script.
I ran it, it was excellent.
I would like to make the default entry to be \r, could you guide me exactly on how to do it and what to change.
Best Regards
John
Howdy, been messing with this script for the past couple weeks to customize it for my job, but I just cannot get the “right” sortprop working, it always spits out an error and I’m not sure why. Can anybody assist with this?
Hi Josh,
I’m not available for this, but if you have some budget for the customization, you might try contacting Keith Gilbert: http://keith.ajar.pro
I tried using the .jsx script to merge multiple fields of text because each glyph in a document I am working on is, for some reason, on a different layer. However, the script thinks there are no text fields selected… when that is 100% wrong.
Is there something that does the opposite? Split paragraphs into separated text boxes keeping formatting?
Not for Illustrator, but we have one for InDesign: https://ajarproductions.com/split/
I would like this for Illustrator, too, if it’s something you’re thinking about.
Thanks for this!
Genius!!!! Wish I had found this a day earlier lol!!!
Thanks, a great utility for sure! You may want to add into the instructions to restart illustrator for it to show up in scripts.