title: TUI image editor get the element from div
body: <p>What i am trying to do is I am taking the upload image preview and passing that image to the TUI image editor for that, I am trying something like this :</p>
  <pre><code>$(document).ready(function() {
  
  
  
      // GET THE IMAGE.
      var img = new Image();
      img.src = $(&quot;#image_upload_preview_profile&quot;).attr(&quot;src&quot;);
  
      // WAIT TILL IMAGE IS LOADED.
      img.onload = function() {
          create_canvas(img);       // FILL THE CANVAS WITH THE IMAGE.
      }
  
      function create_canvas(img) {
          //Create canvas
          var canvas = document.createElement('canvas');
          canvas.id = &quot;CursorLayer&quot;;
          canvas.width = 1224;
          canvas.height = 768;
          canvas.style.zIndex = 8;
          canvas.style.position = &quot;absolute&quot;;
          canvas.style.border = &quot;1px solid&quot;;
          document.getElementById('#tui-image-editor').appendChild('canvas');
      }
  });
  </code></pre>
  <p>By creating canvas and passing that image by taking it's src in the #tui-image-editor . But in that line I ma getting something like this append child cannot be null.
  The error is in #tui-image-editor.
  As we are using library for this so what is happen i am not creating any div through HTML there is only one div : </p>
  <p>I browse this through everywhere can you suggest me this what is the proper solution for this. As i tried creating a div but that breaks the entire library.</p>