title: Angular Material: Highlight Words in a Textbox
body: <p>How do I Highlight Only the Text in Angular Material textbox,   and Not the whole inner box? I only want to highlight up from 's' to the end of 'i' in  (Sushi), not the whole box.</p>
  
  <p>We will apply this to a read only textbox .
  Also, reading Javascript manipulations are not ideal with Angular, so looking for appropriate way.</p>
  
  <p><a href="https://material.angular.io/components/input/overview" rel="nofollow noreferrer">https://material.angular.io/components/input/overview</a></p>
  
  <pre><code>&lt;form class="example-form"&gt;
    &lt;mat-form-field class="example-full-width"&gt;
      &lt;input matInput placeholder="Favorite food" value="Sushi"&gt;
    &lt;/mat-form-field&gt;
  
    &lt;mat-form-field class="example-full-width"&gt;
      &lt;textarea matInput placeholder="Leave a comment"&gt;&lt;/textarea&gt;
    &lt;/mat-form-field&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/K5lwg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K5lwg.png" alt="enter image description here"></a></p>