title: Angular2 - CKEditor use
body: <p>How could I use ckeditor with Angular2 component?</p>
  
  <p>Doing something like:</p>
  
  <pre><code>import {Component} from 'angular2/core'
  
  @Component({
    selector: 'e',
    template: `
    &lt;textarea name="editor1" id="editor1" rows="10" cols="80"&gt;
        This is my textarea to be replaced with CKEditor.
    &lt;/textarea&gt;
    &lt;script&gt;
        CKEDITOR.replace( 'editor1' );
    &lt;/script&gt;
    `
  })
  
  export class E {
  
  }
  </code></pre>
  
  <p>and printing it in index.html like:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Hello&lt;/title&gt;
      &lt;script src="../ckeditor/ckeditor.js"&gt;&lt;/script&gt;
      &lt;script src="../systemjs/dist/system.src.js"&gt;&lt;/script&gt;
      &lt;script src="../es6-shim/es6-shim.js"&gt;&lt;/script&gt;
      &lt;script src="../angular2/bundles/angular2-polyfills.js"&gt;&lt;/script&gt;
      &lt;script src="../rxjs/bundles/Rx.js"&gt;&lt;/script&gt;
      &lt;script src="../angular2/bundles/angular2.dev.js"&gt;&lt;/script&gt;
      &lt;script src="../angular2/bundles/router.dev.js"&gt;&lt;/script&gt;
      &lt;script src="../angular2/bundles/http.dev.js"&gt;&lt;/script&gt;
      &lt;script src="http://fgnass.github.io/spin.js/spin.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
        System.config({
          packages: {
            compiled: {
                format: 'register',
                defaultExtension: 'js'
            }
          }
        });
        System.import('../compiled/boot')
              .then(null, console.error.bind(console));
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      Hackathon incoming!
      &lt;e&gt;Loading...&lt;/e&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>doesn't work. It works good when I put all the textarea with script code in index.html but I really want to have it in component template. It's like the ckeditor doesn't see the textarea ID when it is in component.</p>
  
  <p>How can I make ckeditor plugin working good with Angular2 component? Thank you</p>