笙默考试管理系统-MyExamTest----codemirror(1)
目录
笙默考试管理系统-MyExamTest----codemirror(1)
一、 笙默考试管理系统-MyExamTest----codemirror
二、 笙默考试管理系统-MyExamTest----codemirror
三、 笙默考试管理系统-MyExamTest----codemirror
五、 笙默考试管理系统-MyExamTest----codemirror
// CodeMirror version 2.2
//
// All functions that need access to the editor's state live inside
// the CodeMirror function. Below that, at the bottom of the file,
// some utilities are defined.
// CodeMirror is the only global var we claim
var CodeMirror = (function() {
// This is the function that produces an editor instance. It's
// closure is used to store the editor state.
function CodeMirror(place, givenOptions) {
// Determine effective options based on given values and defaults.
var options = {}, defaults = CodeMirror.defaults;
for (var opt in defaults)
if (defaults.hasOwnProperty(opt))
options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];
var targetDocument = options["document"];
// The element in which the editor lives.
var wrapper = targetDocument.createElement("div");
wrapper.className = "CodeMirror" + (options.lineWrapping ? " CodeMirror-wrap" : "");
// This mess creates the base DOM structure for the editor.
wrapper.innerHTML =
'<div style="overflow: hidden; position: relative; width: 3px; height: 0px;">' + // Wraps and hides input textarea
- '<textarea style="position: absolute; padding: 0; width: 1px;" wrap="off" ' +笙默考试管理系统-MyExamTest----codemirror
'autocorrect="off" autocapitalize="off"></textarea></div>' +
'<div class="CodeMirror-scroll" tabindex="-1">' +
'<div style="position: relative">' + // Set to the height of the text, causes scrolling
'<div style="position: relative">' + // Moved around its parent to cover visible view
'<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' +
// Provides positioning relative to (visible) text origin
'<div class="CodeMirror-lines"><div style="position: relative">' +
'<div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden"></div>' +
'<pre class="CodeMirror-cursor"> </pre>' + // Absolutely positioned blinky cursor
'<div></div>' + // This DIV contains the actual code
'</div></div></div></div></div>';