title: CKeditor Inline editing, get Element class
body: <p>So i am trying to use CKeditor with inline editing and have found a plugin that sends the current data of the ckeditor element to a ajax script which then sends the data to a php script for saving purposes. But since I am going to need multiple editor instances on each page I need to send the id of the editor instance along with the data. These are my files:</p>
  
  <p>index.php</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;CKeditor test&lt;/title&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="ckeditor/ckeditor.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="content"&gt;
          &lt;div class="editable" contenteditable="true"&gt;
              Hello there my friend.
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;script type="text/javascript"&gt;
      window.onload = function()
      {
          CKEDITOR.disableAutoInline = true;
          CKEDITOR.inline( '.editable' )
      }
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the plugin that saves the data: (its a bit messy, sorry)</p>
  
  <pre><code>CKEDITOR.plugins.add( 'inlinesave',
  
  {
  
      init: function( editor )
  
      {
  
          editor.addCommand( 'inlinesave',
  
              {
  
                  exec : function( editor )
  
                  {
  
  
                      addData();
  
  
  
  function addData() {
                          var data = editor.getData();
                          var element = editor.element;
  
  
  
                          jQuery.ajax({
                              type: "POST",
  
  
  
                              /*Replace 'dump.php' with the name of the file you wish to use                                  to handle the data.
  
                              Data can be retrieved from the variable $_POST                                          ['editable_data'].
  */
  
                              url: "dump.php",
  
  
  
                              data: { editabledata: data + ID OF THE ELEMENT HERE }
  
  
                          })
  
  
  
                          .done(function (data, textStatus, jqXHR) {
  
  
                              alert("Your content was successfully saved. " +  + " [" +                           jqXHR.responseText + "]");
  
  
                          })
  
  
  
                          .fail(function (jqXHR, textStatus, errorThrown) {
  
  
                              alert("Error saving content. [" + jqXHR.responseText + "]");
  
                                  });
  
  
                      }
  
  
                  }
  
              });
  
          editor.ui.addButton( 'Inlinesave',
  
          {
  
              label: 'Save',
  
              command: 'inlinesave',
              icon: this.path + 'images/inlinesave.png'
  
          } );
  
      }
  
  } );
  </code></pre>
  
  <p>How can this be achieved?</p>