pell
pell copied to clipboard
Filtered paste: Remove all but basic formatting on paste
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.
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);
https://github.com/jaredreich/pell/issues/123#issuecomment-461344140