title: Font Size relative to container Height - Help convert from vanilla to typescript
body: <p>I have a resizable box in an angular project, wich has some text inside a 
  paragraph, and I need a method to make the text font-size dynamic to fill the whole container all the time. 
  I found a fiddle with an example in vanilla, but I haven't been able to convert it to typescript and make it work on my project.</p>
  
  <p>This is the fiddle showing my purpose and the function I want to convert to typescript.</p>
  
  <pre><code>var autoSizeText;
  
  autoSizeText = function() {
    var el, elements, i, len, results;
    elements = $('.resize');
    console.log(elements);
    if (elements.length &lt; 0) {
      return;
    }
    results = [];
    for (i = 0, len = elements.length; i &lt; len; i++) {
      el = elements[i];
      results.push((function(el) {
        var resizeText, results1;
        resizeText = function() {
          var elNewFontSize;
          elNewFontSize = (parseInt($(el).css('font-size').slice(0, -2)) - 1) + 'px';
          return $(el).css('font-size', elNewFontSize);
        };
        results1 = [];
        while (el.scrollHeight &gt; el.offsetHeight) {
          results1.push(resizeText());
        }
        return results1;
      })(el));
    }
    return results;
  };
  
  $(document).ready(function() {
    return autoSizeText();
  });
  </code></pre>
  
  <p><a href="https://jsfiddle.net/k0gqhq0s/" rel="nofollow noreferrer">https://jsfiddle.net/k0gqhq0s/</a></p>
  
  <p>knowing that I'll be executing it on a method where I have access to paragraph element, the text inside it, it's container and the current font size.</p>
  
  <p>my code is this:</p>
  
  <pre><code>  &lt;quill-editor
      #textEditor
      *ngIf="editMode"
      (dblclick)="readOnly = false;"
      [readOnly]="readOnly"
      [attr.draghandler]="readOnly"
      [(ngModel)]="image.text"
      [modules]="editorConfig"
      (onContentChanged)="checkHeightChanges($event, image)"
      theme="bubble"
      style="width: 100%;height: 100%;"&gt;
  </code></pre>
  
  <p>and I want to execute that autoSizeText method on this event onContentChanged().</p>
  
  <p>Thanks in advance.</p>