diff --git a/ui/frontend/Output/SimplePane.tsx b/ui/frontend/Output/SimplePane.tsx index a049570f4..d72dc8884 100644 --- a/ui/frontend/Output/SimplePane.tsx +++ b/ui/frontend/Output/SimplePane.tsx @@ -10,8 +10,19 @@ interface HighlightErrorsProps { label: string; } +const onOutputPrismCopy: React.ClipboardEventHandler = event => { + // Blank out HTML copy data. + // Though linkified output is handy in the Playground, it does more harm + // than good when copied elsewhere, and terminal output is usable on its own. + const selection = document.getSelection(); + if (selection) { + event.clipboardData.setData('text/plain', selection.toString()); + event.preventDefault(); + } +}; + const HighlightErrors: React.FC = ({ label, children }) => ( -
+
{children}