title: contenteditable Only allow defined tags
body: <p>I have a contenteditable div that users are able to write a small amount of text and I chose to use contentediable div over textarea because I would like them to be able to insert images and links if needed. The issue is I want to strip all other formation from this div in. I would like to only allow certain tags within this div.</p>
  
  <p>What I need help with:</p>
  
  <p>1.) Paste - When pasting it will copy formatting and insert that into the div, is there a way to force paste as plain text?</p>
  
  <p>2.) restrict user from hitting "ctrl+b" to bold text, some for underline, and italicize.</p>
  
  <p>Here is the following code I have and it does work but it seems that if you hit "ctrl+c" to paste and start typing your cursor is behind what you pasted.</p>
  
  <pre><code>$(this).find("*").not("a,img").each(function() { 
    $(this).replaceWith(this.innerHTML); 
  });
  </code></pre>