title: Read Value from Textarea in HTML and Display formatted text in Popup
body: <p>Below is the code where I want to read the value from Textarea and display it in popup.</p>
  
  <p>For example, an Address which is formatted text, the above code works but the text which is read is unformatted, I want it to be formatted.</p>
  
  <p>Please help as I am looking alternative to bootstrap modal.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;title&gt;
        Popup Demo
      &lt;/title&gt;
    &lt;/head&gt;
  &lt;body&gt;
  &lt;script&gt;
      var previewOpen;
      function preview() {
          previewOpen = window.open("", "previewOpen", "width=500, height=600, scrollbars=yes, resizable=yes");
          previewOpen.document.body.innerHTML = document.getElementById("AFlogs").value; // Get the value of text area and run HTML code
      }
  &lt;/script&gt;
  
  &lt;div class="bg-modal"&gt;LOGS:
  &lt;img src="Zoom.png" onclick="preview()" style="float: right;" width="25" height="25" id="preview"/&gt; 
  &lt;textarea class="form-control taAfLogs" id="AFlogs"&gt;&lt;/textarea&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>