I followed this question JavaScript get clipboard data on paste event (Cross browser) to get the pasted data from the clipboard, but I used jquery instead. Now that I got the data, I removed all html tag. But I don't know how to paste it.
element
is a contenteditable div
element.on('paste', function (e) {
var clipboardData, pastedData;
e.preventDefault();
// Get pasted data via clipboard API
clipboardData = e.clipboardData || window.clipboardData || e.originalEvent.clipboardData;
pastedData = clipboardData.getData('Text').replace(/<[^>]*>/g, "");
// How to paste pasteddata now?
console.log(pastedData);
});