pell icon indicating copy to clipboard operation
pell copied to clipboard

Filtered paste: Remove all but basic formatting on paste

Open anoxic opened this issue 7 years ago • 2 comments

I realize that eventually a "Clear Formatting" feature might be added later, however, I wonder if there's a way to (on paste) clear all formatting except what is allowed by the interface buttons. I get I can "cmd shift alt v", but the specific thing I'm looking for is a filtered paste instead of just removing all formatting.

anoxic avatar Jul 21 '17 22:07 anoxic

  var handlerPaste = function handlerPaste(e) {
    var clipboardData, pastedData;
    e.stopPropagation();
    e.preventDefault();
    clipboardData = e.clipboardData || window.clipboardData;
    pastedData = clipboardData.getData('Text');
    exec('insertText', pastedData);
  }
  addEventListener(content, 'paste', handlerPaste);

davladi avatar Mar 21 '18 22:03 davladi

https://github.com/jaredreich/pell/issues/123#issuecomment-461344140

salines avatar Feb 07 '19 09:02 salines