title: How to add class or attribute automatically to img tags in CKEditor?
body: <p>I'm using CKEditor version 3.6</p>
  
  <p>I want to automatically add <code>class="newsleft"</code> to any image tag added through the WYSIWYG.</p>
  
  <p>I've seen a few posts that mention dataProcessor but have no idea which file this should be added or how to do it.</p>
  
  <p>Can someone tell me where I would place the following code?</p>
  
  <pre><code>editor.dataProcessor.htmlFilter.addRules(
  {
      elements:
      {
          img: function( element )
          {
              if ( !element.attributes.alt )
                  element.attributes.alt = 'An image';
          }
      }
  } );
  </code></pre>