if we use code to do the pasting of data from external contents, we can get data using this way.
window.clipboardData.getData("Text")
By doing this way, we lose the format of the content we copied, to avoid this we have another way to do the same.
var range = document.selection.createRange();
range.execCommand("paste");
if we write code for paste this way, the format of the content we copied will be preserved while pasting. it also accepts the table format data.
No comments:
Post a Comment