笙默考试管理系统-MyExamTest----codemirror(11)

笙默考试管理系统-MyExamTest----codemirror(11

目录

笙默考试管理系统-MyExamTest----codemirror(11)

一、 笙默考试管理系统-MyExamTest----codemirror

二、 笙默考试管理系统-MyExamTest----codemirror

三、 笙默考试管理系统-MyExamTest----codemirror

四、 笙默考试管理系统-MyExamTest----codemirror

五、 笙默考试管理系统-MyExamTest----codemirror

  • 笙默考试管理系统-MyExamTest----codemirror

 } else {

                var added = [];

                firstLine.replace(from.ch, null, newText[0]);

                lastLine.replace(null, to.ch, newText[newText.length-1]);

                firstLine.fixMarkEnds(lastLine);

                for (var i = 1, e = newText.length - 1; i < e; ++i)

                    added.push(Line.inheritMarks(newText[i], firstLine));

                if (nlines > 1) doc.remove(from.line + 1, nlines - 1, callbacks);

                doc.insert(from.line + 1, added);

            }

            if (op

  • 笙默考试管理系统-MyExamTest----codemirror

tions.lineWrapping) {

                var perLine = scroller.clientWidth / charWidth() - 3;

                doc.iter(from.line, from.line + newText.length, function(line) {

                    if (line.hidden) return;

                    var guess = Math.ceil(line.text.length / perLine) || 1;

                    if (guess != line.height) updateLineHeight(line, guess);

                });

            } else {

  • 笙默考试管理系统-MyExamTest----codemirror

                doc.iter(from.line, i + newText.length, function(line) {

                    var l = line.text;

                    if (l.length > maxLineLength) {

                        maxLine = l; maxLineLength = l.length; maxWidth = null;

                        recomputeMaxLength = false;

                    }

                });

                if (recomputeMaxLength) {

                    maxLineLength = 0; maxLine = ""; maxWidth = null;

  • 笙默考试管理系统-MyExamTest----codemirror

                    doc.iter(0, doc.size, function(line) {

                        var l = line.text;

                        if (l.length > maxLineLength) {

                            maxLineLength = l.length; maxLine = l;

                        }

                    });

                }

            }

  • 笙默考试管理系统-MyExamTest----codemirror

            // Add these lines to the work array, so that they will be

            // highlighted. Adjust work lines if lines were added/removed.

            var newWork = [], lendiff = newText.length - nlines - 1;

            for (var i = 0, l = work.length; i < l; ++i) {

                var task = work[i];

                if (task < from.line) newWork.push(task);

                else if (task > to.line) newWork.push(task + lendiff);

你可能感兴趣的:(笙默考试管理系统,java)