title: How to fetch the div value in a variable in Ionic 4
body: <p>I am using Ionic 4 and i want to fetch the text inside my div, below is the code of <code>home.page.html</code></p>
  
  <pre><code>&lt;ion-item&gt;
      &lt;div id="Target" class="editable"  [innerHtml]="resume" contenteditable&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit.&lt;/p&gt;
        &lt;/div&gt;
       &lt;br&gt;
  &lt;/ion-item&gt;
  
  &lt;br&gt;
  &lt;button ion-button (click)="fetch_div()"&gt;Fetch Div Value&lt;/button&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>home.page.ts</p>
  
  <pre><code>fetch_div(){
      //code to fetch the value of div
      var ElementClass = document.getElementById("Target").className;
      console.log("---");
      console.log(ElementClass);
  }
  </code></pre>
  
  <p>On clicking the <code>Fetch Div Value</code>, I want to get the what all is written in the div, sample screenshot of div shown below:</p>
  
  <p><a href="https://i.stack.imgur.com/dHWRT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dHWRT.png" alt="enter image description here"></a></p>
  
  <p>How can I achieve this?</p>