var textEditorDelegate = new WebInspector.TextEditorDelegateForSourceFrame(this);
- loadScript("CodeMirrorTextEditor.js");
+ WebInspector.moduleManager.loadModule("codemirror");
this._textEditor = new WebInspector.CodeMirrorTextEditor(this._url, textEditorDelegate);
this._currentSearchResultIndex = -1;
this._textEditor.setReadOnly(!this.canEditSource());
this._shortcuts = {};
- this.addShortcut(WebInspector.KeyboardShortcut.makeKey("s", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta), this._commitEditing.bind(this));
this.element.addEventListener("keydown", this._handleKeyDown.bind(this), false);
this._sourcePosition = new WebInspector.StatusBarText("", "source-frame-cursor-position");
},
/**
- * @param {string} text
- */
- commitEditing: function(text)
- {
- },
-
- /**
* @param {!WebInspector.TextRange} textRange
*/
selectionChanged: function(textRange)
e.consume(true);
},
- _commitEditing: function()
- {
- if (this._textEditor.readOnly())
- return false;
-
- var content = this._textEditor.text();
- this.commitEditing(content);
- return true;
- },
-
__proto__: WebInspector.View.prototype
}