title: CkEditor: Uncaught TypeError: Cannot read property 'indexOf' of undefined
body: <p>I had a problem with CKEditor. When I use plugin BBCode and input a basic smiley ( ex: ":D" or ":(" like the first image ) then the error "Uncaught TypeError: Cannot read property 'indexOf' of undefined" appears in console log, and the editor become empty looks like the third image.</p>
  
  <p>Althought I had inserted "config.extraPlugins = 'smiley';" in config.js, the error still happen.</p>
  
  <p>The first image, I input a smiley.</p>
  
  <p>Then i click "Source" button in the second image.</p>
  
  <p>And click "Source" button again in third image, this is error.</p>
  
  <p>Image 1st: <a href="http://i.stack.imgur.com/nNbCY.jpg" rel="nofollow">http://i.stack.imgur.com/nNbCY.jpg</a></p>
  
  <p>Image 2nd: Miss</p>
  
  <p>Image 3rd: <a href="http://i.stack.imgur.com/UUNfZ.jpg" rel="nofollow">http://i.stack.imgur.com/UUNfZ.jpg</a></p>
  
  <p>And here is my code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>CKEDITOR.replace( 'editor', { extraPlugins : 'bbcode' });</code></pre>
  </div>
  </div>
  </p>
  
  <p>In a config.js:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>CKEDITOR.editorConfig = function( config ) {
    config.extraPlugins = 'smiley';
    config.language = 'vi';
    config.uiColor = '#eeeeee'; config.height = 300;
  };</code></pre>
  </div>
  </div>
  </p>