Web platform features explorer

execCommand()

Discouraged
Tags: api Groups: Clipboard

This feature is discouraged. Consider using Async clipboard , Contenteditable instead. For the rationale, see:

The execCommand() method reads and writes from the clipboard and performs editing commands on editable text, such as changing the font name or style. Related methods check whether commands are supported, enabled, or applied.

Learning resources on MDN

Browser support