title: Check if tinyMCE has a content
body: <p>I'm trying to see if my tinyMCE has a content while writing and i set a flag if yes or not (I'm using AngularJS). So this is the code i use for the tiny:</p>
  
  <pre><code>$scope.tinyHasContent = false;
  tinymce.init({
                  selector: "#elm1",
                  height: 400,
                  language:'it',
                  plugins: [
                      "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
                      "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                      "save table contextmenu directionality emoticons template paste textcolor"
                  ],
                  content_css: "css/partials/content.css",
                  toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage",
                  style_formats: [
                      {title: 'Bold text', inline: 'b'},
                      {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
                      {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
                      {title: 'Example 1', inline: 'span', classes: 'example1'},
                      {title: 'Example 2', inline: 'span', classes: 'example2'},
                      {title: 'Table styles'},
                      {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
                  ],
                  setup : function(ed){
                      ed.on('NodeChange', function(e){
  
                          if(ed.getContent() != '' || ed.getContent() != undefined || ed.getContent() != null) {
                              $scope.tinyHasContent = true;
                              console.log('the content ' + ed.getContent() + " " + $scope.tinyHasContent);
                          } else {
                              $scope.tinyHasContent = false;
                              console.log('the content ' + ed.getContent() + " " + $scope.tinyHasContent);
                          }
                      });
                  }
              });
  </code></pre>
  
  <p>Simply, while typing i can see the log what i'm writing. But the problem is that seems that there is always a content even on init because it returns always $scope.tinyHasContent = true in the log. How is possible?</p>
  
  <p>By the way, summary, this is what i should do:</p>
  
  <pre><code>&lt;div ng-if="tinyHasContent == false"&gt;
   &lt;p&gt;Hello&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>but actually it's not working</p>