title: Copy & Paste plain text within HTML
body: <p>I have a small templating webapp, where the authors can add placeholders within their richttext editor. To prevent errors I want to provide a list of valid placeholders which then can be copied and pasted. My problem here is the way I can restrict what get's copied.
  I tried two approaches, both failed.</p>
  
  <p>First of all how the list of placeholders looks like:</p>
  
  <pre><code>&lt;ul class="placeholders"&gt;
      &lt;li&gt;${address.name}&lt;/li&gt;
      &lt;li&gt;${address.street}&lt;/li&gt;
      &lt;li&gt;${address.city}&lt;/li&gt;
      &lt;li&gt;${address.zip}&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <ol>
  <li><p>Copy to clipboard with JS:
  This doesn't work as the clipboard cannot be accessed because of security concerns. I tried the ZeroClipboard but it's documentation is not clear for me and even the examples I found here at SO weren't helpful. I want to copy the content of the <code>&lt;li&gt;</code> if the user clicks on it. I tried to set instantiate with <code>new ZeroClipboard(jQuery('ul.placeholders li')</code>. But this didn't work at all. In Firefox as soon as I hover over an li the loading wheel appears. </p></li>
  <li><p>Just select the whole text with a range object:
  This basically works with the selection, but when I paste it in the Rich Text Editor, Firefox und IE also paste the li tag. Again as I don't have access to the clipboard I can't control, what gets copied. And as it is a RTE, I don't have much control over how it gets pasted.</p></li>
  </ol>
  
  <p>Has anyone an idea on how I could make either of the approaches work?</p>