title: Javascript function to copy text raw data
body: <p>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: <strong>text1</strong> <em>text2</em>, then that js function should not copy them as: <code>text1 text2</code> but should rather copy them as <code>**text1** *text2*</code>.</p>
  <p>I just know that I can get selected text using function: <code>window.getSelection()</code> but it doesn't copy text raw form.</p>
  <p>Any help would be appreciated :).</p>