CKEditor compatible issue with AngularJs
<p>In javascript, i'm able to use CKEditor by using a single line command as follows:</p>

<pre><code>var oEditor = CKEDITOR.instances.TicketClass;
if (oEditor.mode == 'wysiwyg' )
      oEditor.insertHtml(value);
else
    alert( 'You must be in WYSIWYG mode!' );
</code></pre>

<p>But in angularJs,above code is not working. Its forcing me repeat a loop over 'CKEDITOR.instances' as follows:</p>

<pre><code>var data = CKEDITOR.instances;         
for(i in data){
console.log('i'+data[i].name);
if(data[i].mode == 'wysiwyg')
    data[i].insertHtml(str);    
else
    alert('You must be in WYSIWYG mode!');
}
</code></pre>

<p>How to resolve this?</p>