title: Using CKEditor custom filebrowser and upload with ASP.Net MVC
body: <p>I have a MVC app that Im trying to use CKEditor with.  One example I was looking at is <a href="http://amitraya.blogspot.com/2014/09/ck-editor-implement-your-own-image.html" rel="nofollow">here</a> but there are many others.  So far so good, but one section im still curious about, is the js that sends the selected file name back to the file upload dialog textbox.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $(".returnImage").click("click", function (e) {
              var urlImage = $(this).attr("data-url");
              window.opener.updateValue("cke_72_textInput", urlImage);
              window.close();
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>In particular, the <code>cke_72_textInput</code> element.  My example wasnt working initially, until I opened chrome dev tools and found the actual id of the textinput, which was in my case cke_76_textInput.  Why the id change I wonder?  Seems a little "fragile" to refer to a specific id like this?  The above js code just takes the selected image file and returns it into the textbox of the fileupload dialog.</p>
  
  <p>Is there something exposed that references this textbox element indirectly without specifying it by id (via the config for example)?</p>