title: Append CKEditor in div tag using onclick event?
body: <p>I'm creating a blog website, I want to add this(CKEditor) or any text editor(WYSIWYG) to my form tag. I search a lot on all well known platform. but no answer I found.
  The method I am using is that I wrote the script. When I clicked, I typed the textarea tag code in the quote of my script but Simple textarea tags are added to my code. But the editor script is not loading. How do I load a full functional editor on a click event?</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;utf-8&quot;&gt;
        &lt;title&gt;CKEditor&lt;/title&gt;
        &lt;script src=&quot;https://cdn.ckeditor.com/4.16.2/standard/ckeditor.js&quot;&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
     &lt;h3&gt;Document Load (Working)&lt;/h3&gt;
     &lt;textarea name=&quot;editor1&quot;&gt;&lt;/textarea&gt;
     &lt;script&gt;
             CKEDITOR.replace( 'editor1' );
     &lt;/script&gt;            
     &lt;h3&gt;When Append (not working)&lt;/h3&gt;
     &lt;button onclick=&quot;addCodeEditor('Editor')&quot; class=&quot;btn btn-primary&quot;&gt;Editor&lt;/button&gt;   
     &lt;div id=&quot;additionalElement&quot;&gt;&lt;/div&gt;
     &lt;script&gt;
              CKEDITOR.replace( 'editor2' );
     &lt;/script&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  
     &lt;script&gt;
   var codeEditorCount;
   function addCodeEditor(Editor){
      var div = document.getElementById('additionalElement');
      div.innerHTML += '&lt;textarea name=&quot;editor2&quot;&gt;&lt;/textarea&gt;';
      codeEditorCount++;
   }
     &lt;/script&gt;
  </code></pre>