public EditorContext() {
            Postbox = Postbox.InstanceFor(EditorCode);
            Configuration.ConfigManager.AddEditorConfig(EditorCode, new Configuration.Config {
                Language = SupportedLanguages.JS,
                FormattingType = FormattingType.BRACKETS
            });

            TextsToEnter = new List<string>();
            CaretView = new CaretView();
            TextView = new TextView(CaretView);
            SelectionView = new SelectionView(TextView);
            LinesView = new LinesView();
            FoldingView = new FoldingView();
            EnterTextCommand = new EnterTextCommand(TextView, CaretView, SelectionView);
            RemoveTextCommand = new RemoveTextCommand(TextView, CaretView, SelectionView);
            CaretMoveCommand = new CaretMoveCommand(CaretView, TextView);
            SelectionCommand = new TextSelectionCommand(TextView, SelectionView, CaretView);
            
            CaretView.EditorCode = EditorCode;
            CaretView.Postbox = Postbox;
            TextView.EditorCode = EditorCode;
            TextView.Postbox = Postbox;
            SelectionView.EditorCode = EditorCode;
            SelectionView.Postbox = Postbox;
            LinesView.EditorCode = EditorCode;
            LinesView.Postbox = Postbox;
            FoldingView.EditorCode = EditorCode;
            FoldingView.Postbox = Postbox;

            InitEvents();
            ForceDraw();
        }
        protected override void OnTextInput(TextCompositionEventArgs e) {
            var enterTextCmd = new EnterTextCommand(textView, caretView, selectionView);
            var deselectionCmd = new TextDeselectionCommand(selectionView);

            if (enterTextCmd.CanExecute(e)) {
                ExecuteTextCommand(enterTextCmd, new UndoEnterTextCommand(textView, caretView), e);
                deselectionCmd.Execute();
            }
        }