 
     @visualEditor = ed
 
+    # These events were added to the plugin code as the TinyMCE PluginManager
+    # does not fire any events when plugins are opened or closed.
     ed.on('SaveImage', @imageAdded)
     ed.on('ShowCodeMirror', @showCodeEditor)
     ed.on('SaveCodeMirror', @saveCodeEditor)

        path: "#{baseUrl}/js/vendor/CodeMirror"
      },
      # We may want to add "styleselect" when we collect all styles used throughout the LMS
      # Can have a single toolbar by just specifying "toolbar". Splitting for now so all are visible.
      toolbar: "formatselect | fontselect | bold italic wrapAsCode underline forecolor | bullist numlist outdent indent blockquote | link unlink image | code",
      # TODO: i18n
      block_formats: "Paragraph=p;Preformatted=pre;Heading 1=h1;Heading 2=h2;Heading 3=h3",
      width: '100%',
      height: '400px',

      valid_children : "+body[style]",
      setup: @setupTinyMCE,
      # Cannot get access to tinyMCE Editor instance (for focusing) until after it is rendered.
      # The tinyMCE callback passes in the editor as a parameter.
      init_instance_callback: @initInstanceCallback
    })

