title: tinyMCE-Angular and the code plugin - binding to events in modal
body: <p>Angular 7, using tinyMCE-angular, and we've configured it to use the 'code' plugin. That plugin (in our case) inserts a button [&lt; >] into the tinymce toolbar.  <a href="https://i.stack.imgur.com/SfJHf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SfJHf.png" alt="the button"></a></p>
  
  <p>When you click that button, a modal opens.
  <a href="https://i.stack.imgur.com/O2Qu1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O2Qu1.png" alt="the modal"></a></p>
  
  <p>The problem I have is that we have an (onKeyUp) event triggering when the content of the main tinymce editor is edited--but it doesn't trigger when the code modal is used, because that modal inserts content without using an (onKeyUp) event. </p>
  
  <p>The HTML:</p>
  
  <pre><code>&lt;editor [init]="tinyMceSettings" apiKey="{{tinyMceApiKey}}" id="_featureTabContent" [(ngModel)]="marketPlaceModel.featureContent"
                    (onKeyUp)="onEditorKeyUp('Features_Tab')"&gt;&lt;/editor&gt;
  </code></pre>
  
  <p>The Component code, which is enabling a 'Preview' button below the tinymce editor to either be enabled or disabled. </p>
  
  <pre><code>  onEditorKeyUp(str) {
      if (this.marketPlaceModel.featureContent != null &amp;&amp; this.marketPlaceModel.featureContent.length != 0) {
        this.disablePreviewBtns.featuresbtn = false;
        this.marketPlaceModel.featureTabValVisbile = false;
      }
      else {
        this.disablePreviewBtns.featuresbtn = true;
        this.marketPlaceModel.featureTabValVisbile = true;
      }
  </code></pre>
  
  <p>tinyMCE has event triggers (<a href="https://github.com/tinymce/tinymce-angular#event-binding" rel="nofollow noreferrer">https://github.com/tinymce/tinymce-angular#event-binding</a>), I'm assuming I can use those events somehow (like we're using the onKeyUp event currently) to trigger the same <code>onEditorKeyUp()</code> event, but I can't seem to get that to work. 
  Is there some way to do this that is built into the tinymce editor already, and I'm just missing it? </p>