Paste to Replace

Paste to Replace

Script for Adobe Illustrator

✦ Available exclusively on Patreon for Pro supporters.

ㅤ

Description

Paste to Replace is a modeless Adobe Illustrator script that replaces one or more selected objects with artwork from the clipboard. It provides precise sizing and nine-point alignment, selectable visible or geometric bounds, optional preservation of the original targets, top-level appearance matching, and a searchable built-in User Guide.

ㅤ

Features

Paste to Replace combines repeatable clipboard placement with compact controls and safeguards for dependable replacement workflows.

  • Multiple targets. Replace every outermost selected object with the same clipboard artwork in one operation.
  • Two paste actions. Replace each target or paste a copy while keeping the original artwork.
  • Three sizing modes. Keep the clipboard dimensions, fit proportionally within the target, or stretch to its exact width and height.
  • Nine-point alignment. Align the pasted artwork by any corner, edge midpoint, or center point.
  • Explicit bounds modes. Use Visible Bounds to include strokes and appearance, or Geometric Bounds to use path geometry only.
  • Live preview. Review the selected sizing behavior and reference-point placement before running the action.
  • Appearance matching. Optionally apply each target's opacity and blending mode to the pasted top-level object without altering its children.
  • Selection safety. Process only outermost targets and reject unsupported text-edit selections before making changes.
  • Layer validation. Detect locked or hidden target layers, including unavailable parent layers, before replacement begins.
  • Reliable execution. Use stable selection snapshots, zero-size safeguards, and single-job BridgeTalk processing.
  • Modeless workflow. Keep the palette open while selecting new artwork and repeating replacements.
  • Built-in guidance. Search a resizable User Guide containing setup instructions, control references, troubleshooting, release notes, and support resources.

ㅤ

Installation

1. Download the Paste to Replace.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 > Paste to Replace

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

ㅤ

Launch the Script

Open an Illustrator document, then launch Paste to Replace from the Scripts menu or by opening the JSX file directly.

  • The modeless palette remains available while you work in the document.
  • Center is the default reference point, Keep Size is the default sizing mode, and both appearance-matching options are enabled initially.
  • The initial bounds mode follows Illustrator's Include Stroke in Bounds preference.
  • Hover over a control to view a short description of its action.

ㅤ

ㅤ

image gallery

ㅤ

ㅤ

➊ Copy the Replacement Artwork

Copy the Illustrator artwork that should be placed at each target.

  • Copy one object or multiple objects with Command+C on macOS or Ctrl+C on Windows.
  • Multiple copied objects are grouped into one replacement when pasted.
  • Keep valid Illustrator artwork on the clipboard until the replacement operation finishes.

ㅤ

ㅤ

➋ Select the Target Artwork

Select one or more complete artwork objects to use as replacement targets.

  • Each outermost selected object is processed once.
  • If a group and one of its children are both selected, the group is used and the nested child is ignored.
  • Exit text-edit mode and select the complete text object instead of a text range or insertion point.
  • Unlock and show every target layer and all of its parent layers before continuing.
  • Confirm that every selected target can be moved, translated, and removed by Illustrator.

ㅤ

ㅤ

➌ Choose the Paste Action

Use the split paste button to decide whether each original target remains in the document.

  • Paste to Replace. Paste the clipboard artwork and remove the original target.
  • Paste, Keep Original. Paste the clipboard artwork while retaining the original target.
  • Click the main part of the button to run the currently selected action.
  • Click the arrow to open the action menu and select the other action.

ㅤ

ㅤ

➍ Choose a Sizing Mode

Select how the clipboard artwork should be sized relative to each target.

  • Keep Size. Preserve the clipboard artwork's original dimensions and align only its selected reference point.
image gallery
Keep Size
  • Fit. Scale the pasted artwork proportionally so it fits within the target bounds without changing its aspect ratio.
image gallery
Fit
  • Stretch. Scale width and height independently so the pasted artwork matches the target bounds exactly.
image gallery
Stretch
  • Click the live preview to cycle through the three sizing modes.

ㅤ

ㅤ

➎ Choose a Reference Point

Use the 3×3 selector to choose which point on the pasted artwork aligns with the corresponding point on the target.

  • Choose Top Left, Top, Top Right, Left, Center, Right, Bottom Left, Bottom, or Bottom Right.
  • Center is selected by default.
  • Option-click on macOS or Alt-click on Windows to reset the selector to Center.
  • The live preview shows the chosen alignment in Keep Size and Fit modes.
  • The selector is disabled in Stretch mode because the stretched artwork already matches every target edge.

ㅤ

ㅤ

➏ Choose a Bounds Mode

Choose which Illustrator bounds the script uses for sizing and alignment.

  • Visible Bounds. Include strokes and appearance when measuring both the target and pasted artwork.
  • Geometric Bounds. Use path geometry without stroke or appearance expansion.
  • The initial selection follows Illustrator's Include Stroke in Bounds preference.
  • Switch bounds modes when stroked artwork appears unexpectedly offset or sized.

ㅤ

ㅤ

➐ Match the Target Appearance

Use the Match controls when replacements should inherit the target's transparency behavior.

  • Opacity. Apply the target's opacity to the pasted top-level object.
  • Blending Mode. Apply the target's blending mode to the pasted top-level object.
  • Both controls are enabled by default.
  • Child objects inside pasted groups remain unchanged, preventing compounded transparency or altered internal appearance.

ㅤ

ㅤ

➑ Run the Replacement

Confirm the selected action and controls, then execute the replacement.

  1. Click the main paste button or press Enter.
  2. Wait while the script pastes, groups, sizes, aligns, and styles one replacement for each valid target.
  3. Continue working when the completed replacements become the active selection.
  • The script validates every target before changing the document, preventing a mixed selection from being partially processed because of an invalid target.
  • Repeated clicks are ignored while a BridgeTalk replacement job is already running.
  • The palette stays open so you can select another target set and repeat the workflow.

ㅤ

ㅤ

➒ Keyboard Controls

Use these shortcuts while the main palette is active.

  • Enter. Run the currently selected paste action.
  • Escape. Close the palette.
  • Up Arrow. Select the previous sizing mode.
  • Down Arrow. Select the next sizing mode.
  • Option-click or Alt-click. Reset the reference-point selector to Center.

When the built-in User Guide is open, Escape closes the guide and the Up and Down Arrow keys scroll its content.

ㅤ

ㅤ

☻ Wrap-Up

Paste to Replace turns repetitive object swapping into a consistent workflow for individual objects and large selections. Its sizing, alignment, bounds, appearance, and validation controls keep replacements predictable, while the built-in guide and support resources make help readily available.

ㅤ

ㅤ

Leave a comment

Paste to Replace

Version: 2.0.0

Updated:

    • 2.0.0. Public release of the redesigned version with new features.
    • 1.1.6. Added a searchable, resizable built-in User Guide with expanded documentation, resources, contact actions, and support guidance.
    • 1.1.5. Refined the Bounds and Match panels, added dedicated bounds icons, and bottom-aligned the interactive preview.
    • 1.1.4. Added Visible and Geometric Bounds selection, descriptive sizing controls, and a separate Match panel.
    • 1.1.3. Introduced the built-in User Guide interface and its section-based navigation framework.
    • 1.1.2. Strengthened selection validation, appearance matching, zero-size handling, preview behavior, and BridgeTalk execution safety.
    • 1.1.1. Added replace-or-keep actions, segmented sizing modes, and a live preview.
    • 1.1.0. Introduced custom action and appearance controls with clearer visual feedback.
    • 1.0.9. Replaced reference-point radio buttons with an interactive 3×3 picker.
    • 1.0.8. Added a theme-aware footer with website, guide, and support links.
    • 1.0.7. Improved footer interaction, link handling, and script information access.
    • 1.0.6. Consolidated multi-object replacement, three sizing modes, and appearance matching.
    • 1.0.5. Added blending-mode preservation and refined the replacement workflow.
    • 1.0.4. Added opacity matching for replacement artwork.
    • 1.0.3. Improved clipboard grouping, alignment, and error handling.
    • 1.0.2. Expanded reference-point placement and multiple-object processing.
    • 1.0.1. Added reference-point alignment controls.
    • 1.0.0. Introduced clipboard-based replacement for selected Illustrator artwork.

    ㅤ

    ㅤ

    Tested on MacOS:

    • Adobe Illustrator 2023 (27.0)
    • Adobe Illustrator 2024 (28.1)
    • Adobe Illustrator 2025 (29.0)
    • Adobe Illustrator 2026 (30.8.2)
  • 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 Gradient Type Switcher
    Gradient Type Switcher

    Gradient Type Switcher

    Gradient Type Switcher converts gradient fills and strokes between linear and radial types in Adobe Illustrator. 

    Explore
  2. Explore Sequential Text Numbering
    Sequential Text Numbering

    Sequential Text Numbering

    Sequential Text Numbering automates numbering and labeling across selected text frames in Adobe Illustrator.

    Explore
  3. Explore Quick Resize
    Quick Resize

    Quick Resize

    Quick Resize is a floating panel for Adobe Illustrator that resizes selected objects to an exact width or height.

    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 Paste to Replace.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 Paste to Replace.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 Illustrator: To 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 Paste to Replace script to run it.
    5. The Paste to Replace 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!