The cut event fires when the user starts a cut action in the browser UI. Learn clipboardData.setData, why preventDefault also blocks removal, selection.deleteFromDocument(), oncut, and five try-it labs.
01
Kind
Instance event
02
Type
ClipboardEvent
03
When
User cut action
04
Handler
oncut
05
Key APIs
setData + delete
06
Status
Baseline widely available
Fundamentals
Introduction
Cut is like copy plus remove. When someone selects editable text and presses Ctrl+X (or Cmd+X), the browser fires cut, puts the selection on the clipboard, and deletes it from the page.
You can customize the clipboard payload with setData. If you also call preventDefault(), you must remove the selection yourself (usually selection.deleteFromDocument()) if you still want cut behavior.
💡
Beginner tip
Custom cut = setData → deleteFromDocument() → preventDefault(). Forget the delete step and the text stays in the field.
Concept
Understanding cut
An instance event that answers: “Did the user just start a cut action from the browser UI?”
Default — copy selection to clipboard and remove it from the document.
ClipboardEvent — write with clipboardData.setData(format, data).
Cancelable — preventDefault() blocks clipboard default and document update.
Uneditable content — event may still fire, but often with no data.
Baseline Widely available on MDN (since July 2015).
Foundation
📝 Syntax
Use the event name with addEventListener, or set the handler property:
cut is marked Baseline Widely available on MDN (since July 2015). Logos use the shared browser-image-sprite.png sprite from this project. Editable vs non-editable cut behavior can still differ by browser.
✓ Baseline · Widely available
Element cut
Works across modern desktop and mobile browsers for user-initiated cut actions on editable content.
100%Widely available
Google ChromeSupported · Desktop & Android
Full support
Mozilla FirefoxSupported · Desktop & Android
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
OperaSupported · Modern versions
Full support
Internet ExplorerSupported (legacy clipboard model)
Supported
cutBaseline
Bottom line: Listen for cut to customize outgoing clipboard text; after preventDefault, call deleteFromDocument if you still want the selection removed.
Wrap Up
Conclusion
cut is the “user is cutting” signal. Customize with setData, remember that preventDefault also blocks removal, and call deleteFromDocument() when you still want the selection gone.
Use editable hosts (contenteditable / inputs) for real cut demos
Call deleteFromDocument() when cancelling a custom cut
Keep cut and copy transformations consistent
Learn paste for the inbound clipboard path
❌ Don’t
Forget that preventDefault also blocks removal
Expect to read clipboard contents in a cut handler
Assume a synthetic cut event updates clipboard or DOM
Treat cut-blocking as content protection
Overwrite oncut if you need multiple listeners
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about cut
Copy plus remove—customize with setData, delete manually after preventDefault.
5
Core concepts
✂️01
User cut
UI shortcut / menu
Trigger
📄02
ClipboardEvent
clipboardData
API
📋03
setData
custom payload
Pattern
🗑️04
deleteFromDocument
after preventDefault
Must
🎯05
Baseline
widely available
Compat
❓ Frequently Asked Questions
It fires when the user starts a cut action through the browser UI (for example Ctrl+X / Cmd+X or Edit → Cut). The default action copies the selection to the clipboard and removes it from the document.
No. MDN marks Element cut as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
A ClipboardEvent. The important property is clipboardData, which you can write to with setData(format, data).
Cancelling the default also stops the browser from removing the selection from the document. If you still want a cut-like result, call selection.deleteFromDocument() yourself after setData.
Yes. The cut event can still fire, but the event may contain no clipboard data when the content is not editable.
No. Like copy, a cut handler cannot read clipboard data. You can write with setData after cancelling the default action.
Did you know?
MDN’s classic cut demo uppercases the selection, deletes it from the document, then cancels the default. Paste into another box and you get the uppercase text—while the source box no longer contains that selection.