I want to write a js function such that when copying certain text, it copies its raw form.
What I mean by raw is that, for example, if I want to copy: text1 text2, then that js function should not copy them as: text1 text2
but should rather copy them as **text1** *text2*
.
I just know that I can get selected text using function: window.getSelection()
but it doesn't copy text raw form.
Any help would be appreciated :).
question from:
https://stackoverflow.com/questions/65901977/javascript-function-to-copy-text-raw-data 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…