Text Highlighter

Text Highlighter

Script for Adobe Illustrator

✦ Available exclusively on Patreon for Pro supporters.

Description

Text Highlighter is an Adobe Illustrator script that automatically creates customizable highlight rectangles behind or in front of selected text frames. Perfect for eye-catching presentations, social media graphics, editorial layouts, and any project that calls for emphasis through colored text backgrounds.

The script offers four highlighting modes – by line, word, random words, or specific text – along with live preview, per-rectangle color randomization, and extensive controls for fine-tuning scale, offset, opacity, rounded corners, and placement.

Features

  • Four Highlight Modes — Lines, Words, Random (% of words), or Specific words/phrases
  • Live Preview — See changes in real-time as you adjust settings
  • Flexible Scaling — Adjust width and height independently (0–200%)
  • Custom Colors — Choose any color via hex code or the color picker
  • Opacity Control — Set transparency from 0–100%
  • Offset Controls — Fine-tune horizontal and vertical positioning (±100pt)
  • Rounded Corners — Add a corner radius for softer highlights (0–20pt)
  • Height Reference — Choose between Cap Height or x-height as the sizing baseline
  • Placement — Place highlights behind or in front of the text
  • Randomize Color — Slightly vary the hue and lightness of each rectangle for an organic look
  • Zoom to Fit — Instantly frame the selection in the Illustrator window
  • Batch Processing — Apply highlights to multiple text frames at once
  • Settings Memory — Last-used settings are saved and restored on next run

Installation

1. Download the Text Highlighter.jsx script file.

2. Place the script in your Adobe Illustrator Scripts folder:

⮑ Mac: /Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts

⮑ Windows: C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts

3. Restart Adobe Illustrator if it's already running

4. Access the script via File > Scripts > Text Highlighter

5. Alternatively, run it directly via File > Scripts > Other Script... and browse to the file location


Tip: You can also drag and drop the .jsx file directly onto the Illustrator workspace to run the script instantly – no installation needed.

Using the Script

Basic Usage

1. Open a Document:

  • Launch Adobe Illustrator and open a document containing text
  • If no document is open, the script will prompt you to open one

2. Select Text:

  • Use the Selection Tool (V) to select one or more text frames
  • You can select multiple text frames or groups containing text
  • Empty text frames are skipped with an optional warning

3. Run the Script

  • Go to File > Scripts > Text Highlighter
  • Or drag and drop the .jsx file onto the Illustrator window
  • The Text Highlighter dialog will open:

image gallery

➊ Highlight Mode

Choose how the script targets text for highlighting. The mode panel appears at the top of the dialog with four radio buttons:

  • Lines – One rectangle per line of text
  • Words – One rectangle per individual word
  • Random – A random percentage of words, chosen at run-time
  • Specific Words – Only the exact words, characters, or phrases you specify

Random mode reveals a Highlight % slider (1–100%) and a ✚ re-roll button that picks a new random set of words at the current percentage without changing the slider value.

Specific Words mode reveals a Find text field and a Search button. Type one or more comma-separated terms and press Search to update the preview. If nothing matches, an alert will inform you.

image galleryimage galleryimage galleryimage galleryimage gallery

➋ Scale Settings

Width Scale (0–200%)

  • Adjusts the horizontal size of the highlight rectangle relative to the text bounds
  • 100% = exact text width; values above 100% extend beyond text edges

Height Scale (0–200%)

  • Adjusts the vertical size relative to the chosen height reference
  • 100% = full reference height; values above 100% extend above and below the text

Tip: Use arrow keys in any input field for precise adjustments:

  • Up/Down arrows: ±1
  • Shift + Up/Down: ±10
  • Option/Alt + Up/Down: ±0.1

➌ Offset Controls

Horizontal Offset (−100pt to 100pt)

  • Shifts the highlight left (negative) or right (positive)

Vertical Offset (−100pt to 100pt)

  • Shifts the highlight up (positive) or down (negative)


image galleryimage gallery

➍ Highlight Color

Color Swatch

  • Click the colored swatch to open the color picker (Illustrator's native picker or a system fallback)

Hex Input

  • Type a hex code directly (e.g., #FFEB00) to set the color without opening the picker
  • The swatch updates live as you type

Randomize Checkbox

  • When enabled, each highlight rectangle receives a slightly varied hue and lightness based on the chosen color
  • Creates an organic, hand-marked appearance across multiple highlights
  • Takes effect immediately in the live preview

Opacity (0–100%)

  • Controls the transparency of every highlight rectangle
  • 100% = fully opaque; 0% = fully transparent

Corners (0–20pt)

  • Rounds the corners of the highlight rectangles
  • 0pt = sharp corners; higher values = more pill-shaped

image galleryimage gallery

➎ Height Reference

Choose which character height is used as the sizing baseline:

Cap Height (X)

  • Matches the height of capital letters
  • Best for all-caps text or mixed-case content

x-height (x)

  • Matches the height of lowercase letters (excluding ascenders and descenders)
  • Best for body text or lowercase-dominant content

image galleryimage gallery

➏ Placement

Behind Text

  • Places highlight rectangles behind the text layer
  • Text remains fully visible and selectable

In Front of Text

    • Places highlight rectangles in front of the text
    • Reduce opacity to keep text readable

    image galleryimage gallery

    ➐ Using the Preview

    1. Preview Checkbox

    • Displays live highlight rectangles on the canvas as you change settings
    • Uncheck to hide the preview and improve performance on large documents

    2. Hide Edges

    • Hides the selection bounding box while previewing
    • Makes it easier to evaluate the final look without the blue selection outlines

    3. Adjust Settings

    • Move any slider or type a value into an input field to see instant results
    • Right-click a slider to reset it to its default value
    • Click the  button beside an input to reset that individual setting to its default
    • Click a section label (e.g., "Width Scale:") to instantly reset that control

    4. Zoom to Fit (✚ button)

    • Fits the selected text frames into the Illustrator view window
    • Useful for inspecting fine details while the dialog is open

    ➑ Finalizing

    Apply (OK)

    • Click OK to commit the highlights
    • Live preview rectangles become the permanent result
    • Multiple highlights from the same text frame are automatically grouped

    Cancel

    • Click Cancel to close the dialog without making any changes
    • All preview rectangles are removed

    That's all there is to it — select, tweak, and hit OK. Whether you're building a bold editorial spread or just need a single word to pop, Text Highlighter gets you there in seconds. Play with the modes, lean into the color randomization, and let the live preview do the heavy lifting.

    Leave a comment

    Text Highlighter

    Version: 1.1.0

    Updated:

    • 1.0.0 – Initial release.
      1.0.2 – Fixed issue with custom text frames leading.
      1.0.3 – Settings memory: auto-saves and restores last-used settings.
      1.0.4 – Clickable labels: click any row label to reset that control to default.
      1.0.5 – Hide Edges: toggle selection bounding boxes during preview.
      1.0.6 – Lines, Words, Random, Specific Words.
      1.0.7 – Random mode: Added Percentage % Slider + re-roll button.
      1.0.8 – Specific Words mode: Added Find field + Search button.
      1.1.0 – Randomize Color: per-rectangle hue/lightness jitter for an organic look.

      Tested on MacOS:

      • Adobe Illustrator 2023 (27.0)
      • Adobe Illustrator 2024 (28.1)
      • Adobe Illustrator 2025 (29.0)
      • Adobe Illustrator 2026 (30.0)
    • Supported Versions:

      • Compatible with Adobe Illustrator CS6 and later, including Adobe Illustrator CC versions.

      Operating Systems:

      • Works on both macOS and Windows platforms.
    • End User License Agreement (EULA)

      Last Updated: 21.12.2024

      This End User License Agreement (“Agreement”) is a legal agreement between you (“User” or “Licensee”) and Samolevsky.com (“Licensor”) regarding the use of the Adobe Illustrator scripts (“Software”). By downloading, installing, or using the Software, you agree to be bound by the terms of this Agreement.

      1. Grant of License

      Licensor grants the User a non-exclusive, non-transferable, and revocable license to use the Software in accordance with this Agreement.

      • Free Software: If the Software is provided for free, you may use it for personal or commercial purposes without payment, subject to the restrictions outlined in this Agreement.
      • Paid Software: If the Software is provided for a fee, you may use it only after payment has been made in full.

      2. Usage Rights

      You are permitted to:

      • Install and use the Software on devices you own or control.
      • Use the Software in your personal or commercial projects, subject to compliance with this Agreement.

      3. Restrictions

      You may NOT:

      • Reverse engineer, decompile, or otherwise attempt to discover the source code, underlying ideas, or algorithms of the Software.
      • Reuse, incorporate, or integrate any portion of the Software into any other software, product, or project, except as expressly permitted by the Licensor in writing.
      • Resell, redistribute, or share the Software, whether in its original or modified form, without prior written consent from the Licensor.
      • Claim ownership of the Software or its underlying code.
      • Use the Software in any way that violates applicable laws or regulations.

      4. Ownership

      The Software and all intellectual property rights therein remain the exclusive property of the Licensor. This Agreement does not transfer ownership of the Software or any intellectual property rights to the User.

      5. Disclaimer of Warranties

      THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

      6. Limitation of Liability

      To the maximum extent permitted by law, Licensor shall not be liable for any damages, including but not limited to direct, indirect, incidental, special, or consequential damages, arising out of or related to the use or inability to use the Software.

      7. Termination

      This Agreement is effective until terminated. Licensor may terminate this Agreement immediately if you breach any term of this Agreement. Upon termination, you must cease all use of the Software and destroy any copies in your possession.

      8. Updates and Support

      Licensor is not obligated to provide updates, support, or maintenance for the Software. However, updates may be provided at the sole discretion of the Licensor.

      9. Governing Law

      This Agreement shall be governed by and construed in accordance with the laws of the State of New York, without regard to its conflict of law principles.

      10. Entire Agreement

      This Agreement constitutes the entire agreement between you and the Licensor concerning the Software and supersedes all prior or contemporaneous understandings regarding such subject matter.

      By using the Software, you acknowledge that you have read this Agreement, understand it, and agree to be bound by its terms.

      For any questions or concerns regarding this Agreement, please contact us at hello@samolevsky.com

    Browse More Scripts

    1. Explore Circle With N Points
      Circle With N Points

      Circle With N Points

      Circle With N Points is a versatile Adobe Illustrator script that allows you to easily generate circles and polygons with customized points.

      Explore
    2. Explore Unlock Assistant
      Unlock Assistant

      Unlock Assistant

      Unlock Assistant is a powerful and comprehensive tool designed to streamline your workflow when dealing with locked elements in Adobe Illustrator.

      Explore
    3. Explore Smart Scale
      Smart Scale

      Smart Scale

      Smart Scale is a powerful Adobe Illustrator script that provides advanced resizing capabilities for your artwork.

      Explore

    Introducing ScriptBox

    Your Complete Adobe Illustrator Productivity Hub

    Required Software

    Adobe Illustrator

    Adobe Illustrator is a professional vector graphics software developed by Adobe Inc. It is widely used by designers, illustrators, and artists for creating a variety of digital artwork, including logos, icons, illustrations, typography, and complex design layouts. Illustrator is known for its precision and scalability, allowing users to create high-quality graphics that can be resized without losing clarity. Its features include powerful drawing tools, customizable brushes, advanced typography options, and seamless integration with other Adobe Creative Cloud applications. Illustrator is a go-to tool for creative professionals working on projects for print, web, and multimedia platforms.

    • 🅰 Locating the Scripts Folder

      To install a Text Highlighter.jsx script in Adobe Illustrator, you need to place it in the correct directory where Illustrator
can recognize it. Follow these steps to locate the Scripts folder:

      1. MacOS:
        Open Finder and navigate to:
        Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts
      2. Windows:
        Open File Explorer and navigate to:
        C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts
      3. Replace <Version> with your Adobe Illustrator version (e.g., 2025).
      4. Replace <Language> with your language folder (e.g., "de_DE" for German, "en_US" for English).

      🅱 Installing the Script

      1. Copy the Script File: Copy the Text Highlighter.jsx file to the Scripts folder located in the path above.
      2. On some systems, you may need administrator permissions to modify the Scripts folder.
      3. Restart Adobe IllustratorTo refresh the scripts menu, close and reopen Adobe Illustrator.

      Explore our complete guide to mastering Adobe Illustrator scripts.

      1. Open Adobe Illustrator and ensure a document is active.
      2. Go to the top menu bar and select File > Scripts.
      3. If the script is installed in the Scripts folder, it will appear in the dropdown list.
      4. Click the Text Highlighter script to run it.
      5. The Text Highlighter script will execute, and any dialog boxes or results will appear based on the script’s functionality.

      ☻ Before running any scripts, it’s strongly advised to save your work — especially when working with complex or large documents.

    Got questions?

    Need help or have an idea to share? We’d love to hear from you! Whether you have questions, found a bug, have a feature request, or just want to share your feedback, reach out to us—we’re here for you!