Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ AcePaste — Editor Paste Fix

⭐ If this helped you, please star the repo!

Fix broken Ctrl+V and right-click paste in Ace Editor based coding platforms.

Works on IITM SEEK (seek.study.iitm.ac.in) and any website that uses Ace Editor.

Download Latest Release Manifest V3 Privacy

😤 The Problem

Many coding platforms (like IITM SEEK) block the normal browser paste:

  • Ctrl+V does nothing
  • Right-click → Paste is often disabled too
  • onpaste = null tricks don't work

Why? They use Ace Editor — the visible editor is not a real textarea. It uses a hidden textarea.ace_text-input, and the site attaches its own listeners to swallow paste attempts before they ever reach it.

✅ The Solution

AcePaste's content script loads at document_start — before the host page's own script has a chance to attach its paste blocker — and steps in on both Ctrl+V and right-click paste. The clipboard text is then handed off to the Ace API directly:

ace.edit(document.querySelector('.ace_editor')).insert(clipboardText)

Both paths ride the browser's native paste event, so no permission popup is ever shown. A brief clipboard-read fallback kicks in only if a stricter site manages to block the native paste anyway.

✨ Features

  • Fixes both Ctrl+V and right-click → Paste
  • Insert mode (paste at cursor) or Replace mode (overwrite the whole editor)
  • Works even when the Ace editor is embedded inside an iframe
  • No permission prompts — uses the browser's native paste event
  • Per-site toggle: leave it off everywhere except where you need it
  • 100% local, nothing leaves your browser

📥 Download & Install

Option 1: Download from Releases (Recommended)

  1. Go to Releases
  2. Download ace-paste-v1.0.0.zip from Assets
  3. Unzip it somewhere (e.g. Documents/acepaste)
  4. Open Chrome → chrome://extensions
  5. Turn Developer mode ON (top right)
  6. Click Load unpacked → select the unzipped folder
  7. Done! Refresh your coding platform tab

Option 2: Clone & Load

git clone https://github.com/24525Bilal/ace-paste.git

Then chrome://extensions → Load unpacked → select the folder.

⚙️ Usage

  1. Click the AcePaste icon → Toggle ON (green)
  2. Choose Insert (paste at cursor) or Replace (overwrite editor contents)
  3. Click inside the Ace code editor
  4. Press Ctrl+V, or right-click → Paste
  5. Toggle OFF to restore normal browser behavior
┌─────────────────────────┐
│ ⚡ AcePaste          ●  │
│ ┌─────────────────────┐ │
│ │ Assistant ON    [ON]│ │
│ └─────────────────────┘ │
│ Mode: ( Insert ) Replace│
│ 🟢 ON — Ctrl+V ready  │
└─────────────────────────┘

🔒 Privacy

  • ✅ 100% local — no server, no network request
  • ✅ Never uploads, stores, or logs clipboard
  • ✅ Only runs when toggle is ON
  • ✅ Open source

🛠️ How It Works

Extension ON?
  ├─ OFF → do nothing
  └─ ON → intercept Ctrl+V / right-click paste before the site can block it
           → find Ace Editor (including inside iframes)
           → window.ace.edit(el).insert(text)   [or .setValue() for Replace]
           → silent paste, no permission popup

Uses a MAIN world injected script (injected.js) because Chrome extensions run in an isolated world and cannot see window.ace directly.

📂 Project Structure

acepaste/
├── manifest.json
├── content.js      # Isolated world — captures paste, beats site blockers
├── injected.js     # MAIN world — talks to window.ace
├── popup/
│   ├── popup.html
│   ├── popup.css
│   └── popup.js
├── icons/
└── README.md

📄 License

MIT — free for everyone.


⭐ If this helped you, please star the repo!

It helps others find AcePaste and motivates future updates. Thanks!

Made for students tired of retyping code ❤️

About

Fix broken Ctrl+V and right-click paste in Ace Editor coding platforms like IITM SEEK. Lightweight Chrome extension, 100% local, no permissions asked.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages