title: How to programmatically determine name of CKEditor instance
body: <p>I've added a CKEditor instance programmatically to my page in the code-behind of my ASP.NET page:</p>
  
  <p>VB.NET:</p>
  
  <pre><code>itemEditor = New CkEditor
  cell.Controls.Add(itemEditor)
  </code></pre>
  
  <p>... which works fine.  I can get the HTML on the postback and do stuff with it.</p>
  
  <p>However, I also want to do some client-side stuff with it, specifically take a selected item out of another control, and insert it into the text by handling the <code>onchange</code> event.</p>
  
  <p>So, how can I get the name of the editor instance in the JavaScript, so that I can do stuff like:</p>
  
  <pre><code>function GetCkText()
  {
      var htmlFromEditor = CKEDITOR.instances['editorName'].getData();
      // do stuff with htmlFromEditor
  }
  </code></pre>