//ToDo: OLW Spell Checker
        //public HtmlSourceEditorControl(ISpellingChecker spellingChecker, CommandManager commandManager)
        public HtmlSourceEditorControl(CommandManager commandManager)
        {
            _commandManager = commandManager;
            //_spellingChecker = spellingChecker;

            contextMenu.Entries.Add(CommandId.Cut, false, false);
            contextMenu.Entries.Add(CommandId.CopyCommand, false, false);
            contextMenu.Entries.Add(CommandId.Paste, false, false);
            contextMenu.Entries.Add(CommandId.PasteSpecial, false, false);
            contextMenu.Entries.Add(CommandId.SelectAll, true, true);
            contextMenu.Entries.Add(CommandId.InsertLink, true, true);

            // create and initialize the editor
            _textBox = new TextBoxEditorControl();
            _textBox.BorderStyle = BorderStyle.None;
            _textBox.Multiline = true;
            _textBox.HideSelection = false;
            _textBox.ScrollBars = ScrollBars.Vertical;
            _textBox.Font = new Font("Courier New", 10);
            _textBox.Dock = DockStyle.Fill;
            _textBox.MaxLength = 0;
            _textBox.AcceptsTab = true;
            _textBox.ContextMenu = new ContextMenu();
            _textBox.TextChanged += new EventHandler(_textBox_TextChanged);
            _textBox.ModifiedChanged += new EventHandler(_textBox_ModifiedChanged);
            _textBox.ContextMenuTriggered += new TextBoxEditorControl.ContextMenuTriggeredEventHandler(_textBox_ContextMenuTriggered);
            _textBox.GotFocus += new EventHandler(_textBox_GotFocus);
            _textBox.LostFocus += new EventHandler(_textBox_LostFocus);
            _textBox.KeyDown += new KeyEventHandler(_textBox_KeyDown);
            _textBox.MouseDown += new MouseEventHandler(_textBox_MouseDown);
            _textBox.MouseUp += new MouseEventHandler(_textBox_MouseUp);
            _textBox.RightToLeft = RightToLeft.No;
        }
 private void _textBox_ContextMenuTriggered(object sender, TextBoxEditorControl.ContextMenuTriggeredEventArgs e)
 {
     OnCommandStateChanged();
     Command command = CommandContextMenu.ShowModal(CommandManager, (Control)sender, e.ContextMenuLocation, contextMenu);
     if (command != null)
         command.PerformExecute();
 }